summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tangramtikz/TangramTikz.sty
blob: 304ae6310d7b4b25b1254ec8ded1eb882cb2fe51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
% Author.........: C. Pierquet
% licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt
% Inspiration....: https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{TangramTikz}[2025/01/25 v0.1.7 Tangram Puzzles with TikZ]
% 0.1.7		Améliorations pour la version [en]
% 0.1.6		Ajout de modèles
% 0.1.5		Ajout de modèles
% 0.1.4		Ajout de modèles
% 0.1.3		Ajout de modèles
% 0.1.2		Ajout de modèles
% 0.1.1		Ajout de modèles
% 0.1.0		Version initiale + quelques modèles

%------Packages utiles
\RequirePackage{tikz}
\RequirePackage{xparse}
\RequirePackage{simplekv}
\RequirePackage{xstring}
\RequirePackage{listofitems}
%librairies tikz
\usetikzlibrary{calc,shapes.geometric}

%pieces and styles, [en] and [fr], and keys
%https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex
\tikzset{
	TangBigTri/.pic={\path[pic actions] (0,0)--(2,0)--(2,2)--cycle;},
	TangGrandTri/.pic={\path[pic actions] (0,0)--(2,0)--(2,2)--cycle;},
	TangMedTri/.pic={\path[pic actions] (0,0)--(1,1)--(2,0)--cycle;},
	TangMoyTri/.pic={\path[pic actions] (0,0)--(1,1)--(2,0)--cycle;},
	TangSqua/.pic={\path[pic actions] (0,0)--(1,0)--(1,1)--(0,1)--cycle;},
	TangCar/.pic={\path[pic actions] (0,0)--(1,0)--(1,1)--(0,1)--cycle;},
	TangSmalTri/.pic={\path[pic actions] (0,0)--(1,0)--(1,1)--cycle;},
	TangPetTri/.pic={\path[pic actions] (0,0)--(1,0)--(1,1)--cycle;},
	TangPara/.pic={\path[pic actions] (0,0)--(1,0)--(2,1)--(1,1)--cycle;}
}
\tikzset{%
	TangPuzz/.style={transform shape,fill=#1,draw=#1},
	TangPuzz/.default=black,
	TangSol/.style={transform shape,fill=#1,draw=white,line width=\TangBorder},
	TangSol/.default=black
}

%the square / le carre
\NewDocumentCommand\TangramSquare{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\pic[TangSol={\TanGListeCouleurs[1]}] at (0,0) {TangBigTri};%
		\pic[TangSol={\TanGListeCouleurs[1]},rotate=-90] at (2,2) {TangBigTri};%
		\pic[TangSol={\TanGListeCouleurs[4]},rotate=-90] at (2,0) {TangSqua};%
		\pic[TangSol={\TanGListeCouleurs[3]},rotate=180] at (4,0) {TangSmalTri};%
		\pic[TangSol={\TanGListeCouleurs[3]},rotate=90] at (2,-1) {TangSmalTri};%
		\pic[TangSol={\TanGListeCouleurs[5]},xscale=-1] at (2,-1) {TangPara};%
		\pic[TangSol={\TanGListeCouleurs[2]},rotate=180] at (3,-1) {TangMedTri};%
	}%
	{%
		\pic[#2] at (0,0) {TangBigTri};%
		\pic[#2,rotate=-90] at (2,2) {TangBigTri};%
		\pic[#2,rotate=-90] at (2,0) {TangSqua};%
		\pic[#2,rotate=180] at (4,0) {TangSmalTri};%
		\pic[#2,rotate=90] at (2,-1) {TangSmalTri};%
		\pic[#2,xscale=-1] at (2,-1) {TangPara};%
		\pic[#2,rotate=180] at (3,-1) {TangMedTri};%
	}%
}

%the pinguin / le pingouin
%https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex
\NewDocumentCommand\TangramPinguin{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\path (0,-1) pic[TangSol={\TanGListeCouleurs[3]}] {TangSmalTri}
		++(1,0) pic[TangSol={\TanGListeCouleurs[4]}] {TangSqua}
		++(1,1) pic[TangSol={\TanGListeCouleurs[1]},rotate=-45,yscale=-1] {TangBigTri}
		++(-45:2) pic[TangSol={\TanGListeCouleurs[1]},rotate=-135] {TangBigTri}
		+({-sqrt(2)},0) pic[TangSol={\TanGListeCouleurs[5]},rotate=-135] {TangPara}
		++(-2,{-2*sqrt(2)}) pic[TangSol={\TanGListeCouleurs[2]}] {TangMedTri}
		++(2,1) pic[TangSol={\TanGListeCouleurs[3]},rotate=-90] {TangSmalTri} ;
	}%
	{%
		\path (0,-1) pic[#2] {TangSmalTri}
		++(1,0) pic[#2] {TangSqua}
		++(1,1) pic[#2,rotate=-45,yscale=-1] {TangBigTri}
		++(-45:2) pic[#2,rotate=-135] {TangBigTri}
		+({-sqrt(2)},0) pic[#2,rotate=-135] {TangPara}
		++(-2,{-2*sqrt(2)}) pic[#2] {TangMedTri}
		++(2,1) pic[#2,rotate=-90] {TangSmalTri} ;
	}%
}

%the boat / le bateau
%https://tex.stackexchange.com/questions/407449/typesetting-tangram-figures-in-latex
\NewDocumentCommand\TangramBoat{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\path (0,0) pic[TangSol={\TanGListeCouleurs[2]},rotate=180] {TangMedTri}
		++(-1,-1) pic[TangSol={\TanGListeCouleurs[5]}] {TangPara}
		++(1,0) pic[TangSol={\TanGListeCouleurs[3]}] {TangSmalTri}
		++(1,0) pic[TangSol={\TanGListeCouleurs[4]}] {TangSqua}
		++(2,1) pic[TangSol={\TanGListeCouleurs[3]},rotate=180] {TangSmalTri}
		++(-2.5,0) pic[TangSol={\TanGListeCouleurs[1]},rotate=80] {TangBigTri}
		++(80:4)
		++(170:2) pic[TangSol={\TanGListeCouleurs[1]},rotate=-100] {TangBigTri} ;
	}%
	{%
		\path (0,0) pic[#2,rotate=180] {TangMedTri}
		++(-1,-1) pic[#2] {TangPara}
		++(1,0) pic[#2] {TangSmalTri}
		++(1,0) pic[#2] {TangSqua}
		++(2,1) pic[#2,rotate=180] {TangSmalTri}
		++(-2.5,0) pic[#2,rotate=80] {TangBigTri}
		++(80:4)
		++(170:2) pic[#2,rotate=-100] {TangBigTri} ;
	}%
}

%the house / la maison
\NewDocumentCommand\TangramHome{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=135>({sqrt(8)},0){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=45>(0,0){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}](-0.5,{sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=135>({0.5+sqrt(8)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}](0.5,{sqrt(2)+1}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-45>({sqrt(2)},{sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<xscale=-1,rotate=45>({sqrt(8)},0){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=135>({sqrt(8)},0){TangGrandTri}
		\PieceTangram[#2]<rotate=45>(0,0){TangMoyTri}
		\PieceTangram[#2](-0.5,{sqrt(2)}){TangPara}
		\PieceTangram[#2]<rotate=135>({0.5+sqrt(8)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[#2](0.5,{sqrt(2)+1}){TangCar}
		\PieceTangram[#2]<rotate=-45>({sqrt(2)},{sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<xscale=-1,rotate=45>({sqrt(8)},0){TangPetTri}
	}%
}

%the fir tree / le sapin
\NewDocumentCommand\TangramFirTree{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=0>({0},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=0>({-1.5},{1}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-90>({0.5},{3}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1,rotate=0>({2.5},{2}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=0>({-1.5},{2}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<xscale=-1,rotate=90>({-0.5},{2}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=0>({-0.5},{3}){TangMoyTri}
	}%
	{%
		\PieceTangram[#2]<rotate=0>({0},{0}){TangCar}
		\PieceTangram[#2]<rotate=0>({-1.5},{1}){TangGrandTri}
		\PieceTangram[#2]<rotate=-90>({0.5},{3}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1,rotate=0>({2.5},{2}){TangPara}
		\PieceTangram[#2]<rotate=0>({-1.5},{2}){TangPetTri}
		\PieceTangram[#2]<xscale=-1,rotate=90>({-0.5},{2}){TangPetTri}
		\PieceTangram[#2]<rotate=0>({-0.5},{3}){TangMoyTri}
	}%
}

%the cat / le chat
\NewDocumentCommand\TangramCat{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({2-sqrt(2)},{2+sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=0>(0,0){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=45>({2-sqrt(2)},{2-sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]({2},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=45>({2-1.5*sqrt(2)},{2+1.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<xscale=1,rotate=-135>({2-0.5*sqrt(2)},{2+2.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=90>({2-sqrt(2)},{sqrt(2)}){TangMoyTri}
	}%
	{%
		\PieceTangram[#2]<rotate=45>({2-sqrt(2)},{2+sqrt(2)}){TangCar}
		\PieceTangram[#2]<rotate=0>(0,0){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({2-sqrt(2)},{2-sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]({2},{0}){TangPara}
		\PieceTangram[#2]<rotate=45>({2-1.5*sqrt(2)},{2+1.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<xscale=1,rotate=-135>({2-0.5*sqrt(2)},{2+2.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=90>({2-sqrt(2)},{sqrt(2)}){TangMoyTri}
	}%
}

%the swan / le cygne
\NewDocumentCommand\TangramSwan{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<yscale=-1,rotate=-45>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-45>({sqrt(2)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=0>({sqrt(2)},{sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=0>({sqrt(2)+1},{sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<xscale=-1,rotate=90>({0},{0}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1,rotate=-135>({0},{2+sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<xscale=1,rotate=0>({-1},{1+sqrt(2)}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<yscale=-1,rotate=-45>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-45>({sqrt(2)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]({sqrt(2)},{sqrt(2)}){TangPetTri}
		\PieceTangram[#2]({sqrt(2)+1},{sqrt(2)}){TangCar}
		\PieceTangram[#2]<xscale=-1,rotate=90>({0},{0}){TangMoyTri}
		\PieceTangram[#2]<xscale=-1,rotate=-135>({0},{2+sqrt(2)}){TangPara}
		\PieceTangram[#2]<xscale=1>({-1},{1+sqrt(2)}){TangPetTri}
	}%
}

%the duck / le canard
\NewDocumentCommand\TangramDuck{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<xscale=-1,rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<yscale=-1,rotate=135>({sqrt(2)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({2*sqrt(2)},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-45>({sqrt(2)},{sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=90>({2.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1,rotate=0>({sqrt(8)+0.5*sqrt(2)},{1+0.5*sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({2.5*sqrt(2)-2},{2+0.5*sqrt(2)}){TangMoyTri}
	}%
	{%
		\PieceTangram[#2]<xscale=-1,rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<yscale=-1,rotate=135>({sqrt(2)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({2*sqrt(2)},{0}){TangCar}
		\PieceTangram[#2]<rotate=-45>({sqrt(2)},{sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=90>({2.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<xscale=-1,rotate=0>({sqrt(8)+0.5*sqrt(2)},{1+0.5*sqrt(2)}){TangPara}
		\PieceTangram[#2]({2.5*sqrt(2)-2},{2+0.5*sqrt(2)}){TangMoyTri}
	}%
}

%the pyramid / la pyramide
\NewDocumentCommand\TangramPyramid{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<xscale=1,rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<xscale=-1,rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-45>({-0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=1,rotate=-45>({-sqrt(2)},{sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<xscale=1,rotate=-135>({0},{2*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<xscale=1,rotate=45>({0},{sqrt(2)}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<xscale=1,rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1,rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-45>({-0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<xscale=1,rotate=-45>({-sqrt(2)},{sqrt(2)}){TangPara}
		\PieceTangram[#2]<rotate=45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangCar}
		\PieceTangram[#2]<xscale=1,rotate=-135>({0},{2*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]<xscale=1,rotate=45>({0},{sqrt(2)}){TangPetTri}
	}%
}

%the rocket / la fusee
\NewDocumentCommand\TangramRocket{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=0>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=180>({2},{2}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({0},{2}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0.5},{-1}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-0.5},{-1}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({0.5},{-1}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-90>({1.5},{0}){TangPara}
	}%
	{%
		\PieceTangram[#2]<rotate=0>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({2},{2}){TangGrandTri}
		\PieceTangram[#2]({0},{2}){TangMoyTri}
		\PieceTangram[#2]({0.5},{-1}){TangCar}
		\PieceTangram[#2]({-0.5},{-1}){TangPetTri}
		\PieceTangram[#2]<rotate=180>({0.5},{-1}){TangPetTri}
		\PieceTangram[#2]<rotate=-90>({1.5},{0}){TangPara}
	}%
}

%the candle / la bougie
\NewDocumentCommand\TangramCandle{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<yscale=-1,rotate=-45>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({1.5*sqrt(2)},{1.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({1.5*sqrt(2)},{2.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<yscale=-1>({sqrt(2)-1},{1+2*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({sqrt(2)-0.5},{1+2*sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=70>({sqrt(2)},{2+2*sqrt(2)}){TangPara}
	}%
	{%
		\PieceTangram[#2]<yscale=-1,rotate=-45>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=-135>({1.5*sqrt(2)},{1.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=-135>({1.5*sqrt(2)},{2.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<yscale=-1>({sqrt(2)-1},{1+2*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]({sqrt(2)-0.5},{1+2*sqrt(2)}){TangCar}
		\PieceTangram[#2]<rotate=70>({sqrt(2)},{2+2*sqrt(2)}){TangPara}
	}%
}

%the shirt / la chemise
\NewDocumentCommand\TangramShirt{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({2},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-1},{2}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=90>({1},{2}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({1},{2}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({0},{2}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-90>({2},{3}){TangPara}
	}%
	{%
		\PieceTangram[#2]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[#2]<rotate=90>({2},{0}){TangGrandTri}
		\PieceTangram[#2]({-1},{2}){TangMoyTri}
		\PieceTangram[#2]<rotate=90>({1},{2}){TangPetTri}
		\PieceTangram[#2]({1},{2}){TangCar}
		\PieceTangram[#2]<rotate=180>({0},{2}){TangPetTri}
		\PieceTangram[#2]<rotate=-90>({2},{3}){TangPara}
	}%
}

%the fish / le poisson
\NewDocumentCommand\TangramFish{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<yscale=-1,rotate=-45>({0},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-45>({0},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=-90>({-1},{1}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-45>({sqrt(2)},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-90>({1.5*sqrt(2)-2},{2+0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=180>({1.5*sqrt(2)},{-0.5*sqrt(2)}){TangGrandTri}
	}%
	{%
		\PieceTangram[#2]<yscale=-1,rotate=-45>({0},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=-45>({0},{0}){TangPara}
		\PieceTangram[#2]<rotate=-90>({-1},{1}){TangMoyTri}
		\PieceTangram[#2]<rotate=-45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=-45>({sqrt(2)},{0}){TangCar}
		\PieceTangram[#2]<rotate=-90>({1.5*sqrt(2)-2},{2+0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({1.5*sqrt(2)},{-0.5*sqrt(2)}){TangGrandTri}
	}%
}

%the sailboat / le voilier
\NewDocumentCommand\TangramSailboat{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=45>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]({-2},{0.35}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<yscale=-1,rotate=-45>({0},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<yscale=-1>({-2+sqrt(2)},{0}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({0},{1+2*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<yscale=-1>({-1-2+sqrt(2)},{0}){TangPara}
	}%
	{%
		\PieceTangram[#2]<rotate=45>({0},{0}){TangGrandTri}
		\PieceTangram[#2]({-2},{0.35}){TangGrandTri}
		\PieceTangram[#2]<yscale=-1,rotate=-45>({0},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=-45>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangCar}
		\PieceTangram[#2]<yscale=-1>({-2+sqrt(2)},{0}){TangMoyTri}
		\PieceTangram[#2]<rotate=-90>({0},{1+2*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<yscale=-1>({-1-2+sqrt(2)},{0}){TangPara}
	}%
}

%the kangaroo / le kangourou
\NewDocumentCommand\TangramKangaroo{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=180>({2},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=45>({2},{-0.5}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({2},{3}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1,rotate=-45>({0},{-2}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-0.5*sqrt(2)},{-2-0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-45>({1-0.5*sqrt(2)},{-1-0.5*sqrt(2)}){TangCar}
	}%
	{%
		\PieceTangram[#2]({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({2},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({2},{-0.5}){TangPetTri}
		\PieceTangram[#2]<rotate=-90>({2},{3}){TangPetTri}
		\PieceTangram[#2]<xscale=-1,rotate=-45>({0},{-2}){TangPara}
		\PieceTangram[#2]({-0.5*sqrt(2)},{-2-0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]<rotate=-45>({1-0.5*sqrt(2)},{-1-0.5*sqrt(2)}){TangCar}
	}%
}

%the dog / le chien
\NewDocumentCommand\TangramDog{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<yscale=-1,rotate=-90>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1,rotate=-60>({0},{1.75}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=-45>({2-0.5*sqrt(2)},{0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({2.5},{2.5}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-45>({2.5},{2.5+sqrt(2)}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<yscale=-1,rotate=-90>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1,rotate=-60>({0},{1.75}){TangPara}
		\PieceTangram[#2]<rotate=-135>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=-45>({2-0.5*sqrt(2)},{0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]<rotate=45>({2.5},{2.5}){TangCar}
		\PieceTangram[#2]<rotate=-45>({2.5},{2.5+sqrt(2)}){TangPetTri}
	}%
}

%the rabbit / le lapin (0.1.1)
\NewDocumentCommand\TangramRabbit{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-90>({-sqrt(2)},{-sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({0},{-0.5}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({-sqrt(2)},{-2}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=90>({0.2},{1}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=30>({0.2},{1}){TangPara}
	}%
	{%
		\PieceTangram[#2]<rotate=-135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-90>({-sqrt(2)},{-sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=-90>({0},{-0.5}){TangPetTri}
		\PieceTangram[#2]<rotate=-135>({-sqrt(2)},{-2}){TangPetTri}
		\PieceTangram[#2]({0},{0}){TangCar}
		\PieceTangram[#2]<rotate=90>({0.2},{1}){TangMoyTri}
		\PieceTangram[#2]<rotate=30>({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]}]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=180>({2},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-45>({2},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({-1},{-0.75}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=90>({-1},{-0.75}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=135>({sqrt(2)-2},{0.25}){TangMoyTri}
	}%
	{%
		\PieceTangram[#2]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({2},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=135>({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=-45>({2},{0}){TangPara}
		\PieceTangram[#2]({-1},{-0.75}){TangCar}
		\PieceTangram[#2]<rotate=90>({-1},{-0.75}){TangPetTri}
		\PieceTangram[#2]<rotate=135>({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]}]<rotate=180>({2},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({0},{-1}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({1.6},{-0.4}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-2},{1}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({1},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({1+sqrt(2)},{1}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<yscale=-1,rotate=45>({-2},{1}){TangPara}
	}%
	{%
		\PieceTangram[#2]<rotate=180>({2},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=90>({0},{-1}){TangGrandTri}
		\PieceTangram[#2]<rotate=-135>({1.6},{-0.4}){TangPetTri}
		\PieceTangram[#2]({-2},{1}){TangMoyTri}
		\PieceTangram[#2]({1},{0}){TangCar}
		\PieceTangram[#2]<rotate=135>({1+sqrt(2)},{1}){TangPetTri}
		\PieceTangram[#2]<yscale=-1,rotate=45>({-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]}]<rotate=135>({sqrt(2)},{-sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-45>({-1},{1}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({sqrt(2)-1},{1}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=-45>({0},{-sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({0.9},{-sqrt(2)-0.9}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]({-sqrt(2)-1},{-sqrt(2)-1}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({-sqrt(2)-0.5},{-sqrt(2)-0.5}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=135>({sqrt(2)},{-sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=-45>({-1},{1}){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({sqrt(2)-1},{1}){TangCar}
		\PieceTangram[#2]<rotate=-45>({0},{-sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]<rotate=-90>({0.9},{-sqrt(2)-0.9}){TangPetTri}
		\PieceTangram[#2]({-sqrt(2)-1},{-sqrt(2)-1}){TangPara}
		\PieceTangram[#2]<rotate=180>({-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]}]<rotate=180>({3.5},{3.5}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({1.5},{3.5}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]({2},{2}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({0.5},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=-90>({2},{1.5}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({2.5},{0}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({3.5},{3.5}){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({1.5},{3.5}){TangCar}
		\PieceTangram[#2]({2},{2}){TangPara}
		\PieceTangram[#2]<rotate=180>({0.5},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=-90>({2},{1.5}){TangMoyTri}
		\PieceTangram[#2]<rotate=-135>({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]}]<rotate=180>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-2},{0}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<xscale=-1,rotate=-78>({-2},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({0},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-135>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-135>({sqrt(2)},{0.25+sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({1+0.5*sqrt(2)},{1.5*sqrt(2)-0.25}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=180>({0},{0}){TangGrandTri}
		\PieceTangram[#2]({-2},{0}){TangMoyTri}
		\PieceTangram[#2]<xscale=-1,rotate=-78>({-2},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=45>({0},{0}){TangCar}
		\PieceTangram[#2]<rotate=-135>({0.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=-135>({sqrt(2)},{0.25+sqrt(2)}){TangPara}
		\PieceTangram[#2]<rotate=180>({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]}]<rotate=180>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({0},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=45>({-0.5*sqrt(2)},{0.5*sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=45>({0},{sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({-1.5},{-1.5}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({-1.5-0.35},{-1.5-sqrt(2)+0.35}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=180>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({0},{0}){TangCar}
		\PieceTangram[#2]<rotate=45>({-0.5*sqrt(2)},{0.5*sqrt(2)}){TangPara}
		\PieceTangram[#2]<rotate=45>({0},{sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]<rotate=-135>({-1.5},{-1.5}){TangPetTri}
		\PieceTangram[#2]<rotate=-90>({-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]}]<rotate=-45>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=135>({3*sqrt(2)},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=45,yscale=-1>({0},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({1.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=45>({2*sqrt(2)},{-sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({2*sqrt(2)},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-135>({1.5*sqrt(2)},{-0.5*sqrt(2)}){TangCar}
	}%
	{%
		\PieceTangram[#2]<rotate=-45>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=135>({3*sqrt(2)},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=45,yscale=-1>({0},{0}){TangPara}
		\PieceTangram[#2]<rotate=135>({1.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=45>({2*sqrt(2)},{-sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]<rotate=-135>({2*sqrt(2)},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=-135>({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]}]<rotate=-135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135,xscale=-1>({0},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=45>({0.5*sqrt(2)},{-0.5*sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-135>({sqrt(2)},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-45,yscale=-1>({0.5*sqrt(2)},{1.5*sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({sqrt(2)},{2*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=135>({2*sqrt(2)},{1.5*sqrt(2)}){TangMoyTri}
	}%
	{%
		\PieceTangram[#2]<rotate=-135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=135,xscale=-1>({0},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=45>({0.5*sqrt(2)},{-0.5*sqrt(2)}){TangCar}
		\PieceTangram[#2]<rotate=-135>({sqrt(2)},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-45,yscale=-1>({0.5*sqrt(2)},{1.5*sqrt(2)}){TangPara}
		\PieceTangram[#2]<rotate=-135>({sqrt(2)},{2*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=135>({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]}]<rotate=-135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-180>({2},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({0},{-2.5}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({0},{1}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=90,xscale=-1>({-sqrt(2)},{-sqrt(2)}){TangPara}
	}%
	{%
		\PieceTangram[#2]<rotate=-135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-180>({2},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=135>({2+0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=-90>({0},{-2.5}){TangPetTri}
		\PieceTangram[#2]({0},{0}){TangCar}
		\PieceTangram[#2]({0},{1}){TangMoyTri}
		\PieceTangram[#2]<rotate=90,xscale=-1>({-sqrt(2)},{-sqrt(2)}){TangPara}
	}%
}

%the goat / la chèvre (0.1.3)
\NewDocumentCommand\TangramGoat{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({1},{-1}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({-2*sqrt(2)+1},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=135>({-sqrt(2)},{sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=45>({-2.5*sqrt(2)},{0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]({-2.5*sqrt(2)},{1.5*sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=10>({1},{1}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=90>({1},{-1}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({-2*sqrt(2)+1},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=135>({-sqrt(2)},{sqrt(2)}){TangCar}
		\PieceTangram[#2]<rotate=45>({-2.5*sqrt(2)},{0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]({-2.5*sqrt(2)},{1.5*sqrt(2)}){TangPara}
		\PieceTangram[#2]<rotate=10>({1},{1}){TangPetTri}
	}%
}

%the lion / le lion (0.1.3)
\NewDocumentCommand\TangramLion{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=135>({0},{0}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({sqrt(2)},{-sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-55>({sqrt(2)},{2-sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({sqrt(2)},{-sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({-sqrt(2)+0.5},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({-sqrt(2)},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-135>({-sqrt(2)-1.75},{1.75}){TangCar}
	}%
	{%
		\PieceTangram[#2]<rotate=135>({0},{0}){TangMoyTri}
		\PieceTangram[#2]<rotate=90>({sqrt(2)},{-sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=-55>({sqrt(2)},{2-sqrt(2)}){TangPara}
		\PieceTangram[#2]<rotate=135>({sqrt(2)},{-sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=180>({-sqrt(2)+0.5},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=90>({-sqrt(2)},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-135>({-sqrt(2)-1.75},{1.75}){TangCar}
	}%
}

%the factory / l'usine (0.1.4)
\NewDocumentCommand\TangramFactory{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-135>({0},{2*sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=45>({-sqrt(2)},{sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({-1},{2*sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({0.5*sqrt(2)-0.5},{2*sqrt(2)+1}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1,rotate=90>({-2*sqrt(2)},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-180>({-2*sqrt(2)+1},{2}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=135>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-135>({0},{2*sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=45>({-sqrt(2)},{sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]({-1},{2*sqrt(2)}){TangCar}
		\PieceTangram[#2]<rotate=135>({0.5*sqrt(2)-0.5},{2*sqrt(2)+1}){TangPetTri}
		\PieceTangram[#2]<xscale=-1,rotate=90>({-2*sqrt(2)},{0}){TangPara}
		\PieceTangram[#2]<rotate=-180>({-2*sqrt(2)+1},{2}){TangPetTri}
	}%
}

%the angel / l'ange (0.1.4)
\NewDocumentCommand\TangramAngel{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({0},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=90>({0},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=90>({0},{1}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({0},{2.5}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-45>({0},{3}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=67.5>({0},{3}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<xscale=-1,rotate=5>({0},{3}){TangGrandTri}
	}%
	{%
		\PieceTangram[#2]<rotate=135>({0},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=90>({0},{0}){TangPara}
		\PieceTangram[#2]<rotate=90>({0},{1}){TangMoyTri}
		\PieceTangram[#2]<rotate=-90>({0},{2.5}){TangPetTri}
		\PieceTangram[#2]<rotate=-45>({0},{3}){TangCar}
		\PieceTangram[#2]<rotate=67.5>({0},{3}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1,rotate=5>({0},{3}){TangGrandTri}
	}%
}

%the tower / la tour (0.1.4)
\NewDocumentCommand\TangramTower{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]({-2},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-90>({0},{3}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({1},{2+sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=180>({2-0.5*sqrt(2)},{3+0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({0},{3+0.5*sqrt(2)}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({0.5+0.5*sqrt(2)},{4+0.5*sqrt(2)}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]({-2},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[#2]<rotate=-90>({0},{3}){TangPara}
		\PieceTangram[#2]<rotate=-135>({1},{2+sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=180>({2-0.5*sqrt(2)},{3+0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]({0},{3+0.5*sqrt(2)}){TangCar}
		\PieceTangram[#2]<rotate=135>({0.5+0.5*sqrt(2)},{4+0.5*sqrt(2)}){TangPetTri}
	}%
}

%the UFO / l'OVNI (0.1.4)
\NewDocumentCommand\TangramUfo{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-135>({0},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({2},{-2}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=180>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-1},{0}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<rotate=-90>({2},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-3},{-1}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({-2},{-1}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=-135>({0},{0}){TangCar}
		\PieceTangram[#2]<rotate=90>({2},{-2}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({0},{0}){TangGrandTri}
		\PieceTangram[#2]({-1},{0}){TangMoyTri}
		\PieceTangram[#2]<rotate=-90>({2},{0}){TangPara}
		\PieceTangram[#2]({-3},{-1}){TangPetTri}
		\PieceTangram[#2]<rotate=180>({-2},{-1}){TangPetTri}
	}%
}

%the chicken / la poule (0.1.5)
\NewDocumentCommand\TangramChicken{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<xscale=-1,rotate=90>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]({0.25},{0.25}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=135>({0.5*sqrt(2)},{-0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({1},{2}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=135>({1+sqrt(2)},{3}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1>({-1},{2}){TangPara}
	}%
	{%
		\PieceTangram[#2]<rotate=90>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1,rotate=90>({0},{0}){TangGrandTri}
		\PieceTangram[#2]({0.25},{0.25}){TangPetTri}
		\PieceTangram[#2]<rotate=135>({0.5*sqrt(2)},{-0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]({1},{2}){TangCar}
		\PieceTangram[#2]<rotate=135>({1+sqrt(2)},{3}){TangPetTri}
		\PieceTangram[#2]<xscale=-1>({-1},{2}){TangPara}
	}%
}

%the turtle / la tortue (0.1.5)
\NewDocumentCommand\TangramTurtle{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<xscale=-1,rotate=90>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1,,rotate=90>({2},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({3},{1}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=90>({0},{0}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=45>({-0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-135>({2+0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]({0},{0}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1,rotate=90>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1,,rotate=90>({2},{0}){TangPara}
		\PieceTangram[#2]({3},{1}){TangCar}
		\PieceTangram[#2]<rotate=90>({0},{0}){TangMoyTri}
		\PieceTangram[#2]<rotate=45>({-0.5*sqrt(2)},{-0.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]<rotate=-135>({2+0.5*sqrt(2)},{0.5*sqrt(2)}){TangPetTri}
	}%
}

%the crab / le crabe (0.1.5)
\NewDocumentCommand\TangramCrab{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=90>({3},{-1}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=180>({1},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]({1},{1}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]({2},{1}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({3},{3}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]<rotate=90>({0},{1}){TangMoyTri}
	}%
	{%
		\PieceTangram[#2]<rotate=-90>({0},{2}){TangGrandTri}
		\PieceTangram[#2]<rotate=90>({3},{-1}){TangGrandTri}
		\PieceTangram[#2]<rotate=180>({1},{0}){TangPetTri}
		\PieceTangram[#2]({1},{1}){TangCar}
		\PieceTangram[#2]({2},{1}){TangPara}
		\PieceTangram[#2]<rotate=-90>({3},{3}){TangPetTri}
		\PieceTangram[#2]<rotate=90>({0},{1}){TangMoyTri}
	}%
}

%the snail / l'ecargot (0.1.5)
\NewDocumentCommand\TangramSnail{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=45>({0},{0}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-135>({0},{2*sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]({0},{0}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({1},{0}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=-90>({-1},{1}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-2},{0}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-45>({2},{1}){TangCar}
	}%
	{%
		\PieceTangram[#2]<rotate=45>({0},{0}){TangGrandTri}
		\PieceTangram[#2]<rotate=-135>({0},{2*sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]({0},{0}){TangPara}
		\PieceTangram[#2]({1},{0}){TangMoyTri}
		\PieceTangram[#2]<rotate=-90>({-1},{1}){TangPetTri}
		\PieceTangram[#2]({-2},{0}){TangPetTri}
		\PieceTangram[#2]<rotate=-45>({2},{1}){TangCar}
	}%
}

%the goose / l'oie (0.1.6)
\NewDocumentCommand\TangramGoose{ s O{TangPuzz} }{%*=colorcorrection,[key for pic]
	\IfBooleanTF{#1}%
	{%
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-135>({sqrt(2)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[4]}]<rotate=-135>({0},{0}){TangCar}
		\PieceTangram[TangSol={\TanGListeCouleurs[1]}]<rotate=-45>({-1.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[5]}]<xscale=-1>({1-1.5*sqrt(2)},{0.5*sqrt(2)}){TangPara}
		\PieceTangram[TangSol={\TanGListeCouleurs[2]}]({-1.5*sqrt(2)-2},{1+0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]<rotate=45>({sqrt(2)},{-1.5*sqrt(2)}){TangPetTri}
		\PieceTangram[TangSol={\TanGListeCouleurs[3]}]({-0.5},{-sqrt(2)-0.5}){TangPetTri}
	}%
	{%
		\PieceTangram[#2]<rotate=-135>({sqrt(2)},{sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<rotate=-135>({0},{0}){TangCar}
		\PieceTangram[#2]<rotate=-45>({-1.5*sqrt(2)},{0.5*sqrt(2)}){TangGrandTri}
		\PieceTangram[#2]<xscale=-1>({1-1.5*sqrt(2)},{0.5*sqrt(2)}){TangPara}
		\PieceTangram[#2]({-1.5*sqrt(2)-2},{1+0.5*sqrt(2)}){TangMoyTri}
		\PieceTangram[#2]<rotate=45>({sqrt(2)},{-1.5*sqrt(2)}){TangPetTri}
		\PieceTangram[#2]({-0.5},{-sqrt(2)-0.5}){TangPetTri}
	}%
}

%macros for tangram creation / commandes pour créer le tangram
\NewDocumentCommand\TangramTikzCreateEN{ m }{%
	\readlist*\TanGListeCouleurs{\TangColors}%
	\ifboolKV[TGRMTikz]{Puzzle}{#1[TangPuzz={\TangColor}]}{}%
	\ifboolKV[TGRMTikz]{Solution}{#1[TangSol={\TangColor}]}{}%
	\ifboolKV[TGRMTikz]{ColorSolution}{#1*}{}%
}
\NewDocumentCommand\TangramTikzCreateFR{ m }{%
	\readlist*\TanGListeCouleurs{\TangCouleurs}%
	\ifboolKV[TGRMTikz]{Puzzle}{#1[TangPuzz={\TangCouleur}]}{}%
	\ifboolKV[TGRMTikz]{Correction}{#1[TangSol={\TangCouleur}]}{}%
	\ifboolKV[TGRMTikz]{CorrectionCouleur}{#1*}{}%
}

\defKV[TGRMTikz]{%keys [en] and [fr]
	ListeCouleurs=\xdef\TangCouleurs{#1},
	ColorList=\xdef\TangColors{#1},%
	Couleur=\xdef\TangCouleur{#1},%
	Color=\xdef\TangColor{#1},%
	Sep=\xdef\TangBorder{#1}
}
\setKVdefault[TGRMTikz]{%keys by default [en] and [fr]
	Puzzle=true,%
	Correction=false,%
	CorrectionCouleur=false,%
	Solution=false,%en
	ColorSolution=false,%en
	ListeCouleurs={red,orange,blue,green,purple},%
	ColorList={red,orange,blue,green,purple},%
	Couleur=black,%
	Color=black,%
	Sep=1pt
}

%the independent command / la commande autonome
\NewDocumentCommand\TangramTikz{ O{} D<>{} m }{%
	\useKVdefault[TGRMTikz]%
	\setKV[TGRMTikz]{#1}%
	\begin{tikzpicture}[line join=bevel,#2]%
		%SQUARE
		\IfStrEq{#3}{Square}{\TangramTikzCreateEN{\TangramSquare}}{}%
		\IfStrEq{#3}{Carre}{\TangramTikzCreateFR{\TangramSquare}}{}%
		%PINGUIN
		\IfStrEq{#3}{Pinguin}{\TangramTikzCreateEN{\TangramPinguin}}{}%
		\IfStrEq{#3}{Pingouin}{\TangramTikzCreateFR{\TangramPinguin}}{}%
		%BOAT
		\IfStrEq{#3}{Boat}{\TangramTikzCreateEN{\TangramBoat}}{}%
		\IfStrEq{#3}{Bateau}{\TangramTikzCreateFR{\TangramBoat}}{}%
		%HOME
		\IfStrEq{#3}{Home}{\TangramTikzCreateEN{\TangramHome}}{}%
		\IfStrEq{#3}{Maison}{\TangramTikzCreateFR{\TangramHome}}{}%
		%FIRTREE
		\IfStrEq{#3}{FirTree}{\TangramTikzCreateEN{\TangramFirTree}}{}%
		\IfStrEq{#3}{Sapin}{\TangramTikzCreateFR{\TangramFirTree}}{}%
		%CAT
		\IfStrEq{#3}{Cat}{\TangramTikzCreateEN{\TangramCat}}{}%
		\IfStrEq{#3}{Chat}{\TangramTikzCreateFR{\TangramCat}}{}%
		%SWAN
		\IfStrEq{#3}{Swan}{\TangramTikzCreateEN{\TangramSwan}}{}%
		\IfStrEq{#3}{Cygne}{\TangramTikzCreateFR{\TangramSwan}}{}%
		%PYRAMID
		\IfStrEq{#3}{Pyramid}{\TangramTikzCreateEN{\TangramPyramid}}{}%
		\IfStrEq{#3}{Pyramide}{\TangramTikzCreateFR{\TangramPyramid}}{}%
		%DUCK
		\IfStrEq{#3}{Duck}{\TangramTikzCreateEN{\TangramDuck}}{}%
		\IfStrEq{#3}{Canard}{\TangramTikzCreateFR{\TangramDuck}}{}%
		%ROCKET
		\IfStrEq{#3}{Rocket}{\TangramTikzCreateEN{\TangramRocket}}{}%
		\IfStrEq{#3}{Fusee}{\TangramTikzCreateFR{\TangramRocket}}{}%
		%CANDLE
		\IfStrEq{#3}{Candle}{\TangramTikzCreateEN{\TangramCandle}}{}%
		\IfStrEq{#3}{Bougie}{\TangramTikzCreateFR{\TangramCandle}}{}%
		%SHIRT
		\IfStrEq{#3}{Shirt}{\TangramTikzCreateEN{\TangramShirt}}{}%
		\IfStrEq{#3}{Chemise}{\TangramTikzCreateFR{\TangramShirt}}{}%
		%FISH
		\IfStrEq{#3}{Fish}{\TangramTikzCreateEN{\TangramFish}}{}%
		\IfStrEq{#3}{Poisson}{\TangramTikzCreateFR{\TangramFish}}{}%
		%SAILBOAT
		\IfStrEq{#3}{Sailboat}{\TangramTikzCreateEN{\TangramSailboat}}{}%
		\IfStrEq{#3}{Voilier}{\TangramTikzCreateFR{\TangramSailboat}}{}%
		%KANGAROO
		\IfStrEq{#3}{Kangaroo}{\TangramTikzCreateEN{\TangramKangaroo}}{}%
		\IfStrEq{#3}{Kangourou}{\TangramTikzCreateFR{\TangramKangaroo}}{}%
		%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}}{}%
		%GOAT
		\IfStrEq{#3}{Goat}{\TangramTikzCreateEN{\TangramGoat}}{}%
		\IfStrEq{#3}{Chevre}{\TangramTikzCreateFR{\TangramGoat}}{}%
		%LION
		\IfStrEq{#3}{Lions}{\TangramTikzCreateEN{\TangramLion}}{}%
		\IfStrEq{#3}{Lion}{\TangramTikzCreateFR{\TangramLion}}{}%
		%FACTORY
		\IfStrEq{#3}{Factory}{\TangramTikzCreateEN{\TangramFactory}}{}%
		\IfStrEq{#3}{Usine}{\TangramTikzCreateFR{\TangramFactory}}{}%
		%ANGEL
		\IfStrEq{#3}{Angel}{\TangramTikzCreateEN{\TangramAngel}}{}%
		\IfStrEq{#3}{Ange}{\TangramTikzCreateFR{\TangramAngel}}{}%
		%TOWER
		\IfStrEq{#3}{Tower}{\TangramTikzCreateEN{\TangramTower}}{}%
		\IfStrEq{#3}{Tour}{\TangramTikzCreateFR{\TangramTower}}{}%
		%UFO
		\IfStrEq{#3}{Ufo}{\TangramTikzCreateEN{\TangramUfo}}{}%
		\IfStrEq{#3}{Ovni}{\TangramTikzCreateFR{\TangramUfo}}{}%
		%CHICKEN
		\IfStrEq{#3}{Chicken}{\TangramTikzCreateEN{\TangramChicken}}{}%
		\IfStrEq{#3}{Poule}{\TangramTikzCreateFR{\TangramChicken}}{}%
		%TURTLE
		\IfStrEq{#3}{Turtle}{\TangramTikzCreateEN{\TangramTurtle}}{}%
		\IfStrEq{#3}{Tortue}{\TangramTikzCreateFR{\TangramTurtle}}{}%
		%CRAB
		\IfStrEq{#3}{Crab}{\TangramTikzCreateEN{\TangramCrab}}{}%
		\IfStrEq{#3}{Crabe}{\TangramTikzCreateFR{\TangramCrab}}{}%
		%SNAIL
		\IfStrEq{#3}{Snail}{\TangramTikzCreateEN{\TangramSnail}}{}%
		\IfStrEq{#3}{Escargot}{\TangramTikzCreateFR{\TangramSnail}}{}%
		%GOOSE
		\IfStrEq{#3}{Goose}{\TangramTikzCreateEN{\TangramGoose}}{}%
		\IfStrEq{#3}{Oie}{\TangramTikzCreateFR{\TangramGoose}}{}%
	\end{tikzpicture}%
}

%manual creation / creation manuelle
\NewDocumentCommand\PieceTangram{ O{TangPuzz} D<>{} D(){0,0} m }{%booléen+options pic+place pic+nom piece
	\pic[#1,#2] at (#3) {#4};%
}
\NewDocumentEnvironment{EnvTangramTikz}{ O{} D<>{} }%
{%
	\useKVdefault[TGRMTikz]%
	\setKV[TGRMTikz]{#1}%
	\begin{tikzpicture}[line join=bevel,#2]%
}%
{%
	\end{tikzpicture}%
}

\endinput