Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
GuillaumeLaplante-Anfossi
GitHub Repository: GuillaumeLaplante-Anfossi/Poissons
Path: blob/main/Talk GDRIM/diagTer.tex
1016 views
1
%author : berenice delcroix-oger
2
3
\documentclass[border=2pt]{standalone}
4
\usepackage{tikz}
5
\usetikzlibrary{positioning, fit, shapes, arrows, calc}
6
7
\pgfdeclarelayer{bg} % declare background layer
8
\pgfsetlayers{bg,main} % set the order of the layers (main is the standard layer)
9
10
\newcommand{\coula}{0785F2}
11
\newcommand{\coulb}{F29F05}
12
\newcommand{\coulc}{F21313}
13
\newcommand{\could}{E6F21F}
14
15
16
17
\definecolor{part1}{HTML}{\coula}
18
\definecolor{part2}{HTML}{\coulb}
19
\definecolor{part3}{HTML}{\coulc}
20
\definecolor{part4}{HTML}{\could}
21
22
\begin{document}
23
\begin{tikzpicture}
24
\coordinate (A) at (30:2);
25
\coordinate (B) at (90:2);
26
\coordinate (C) at (150:2);
27
\coordinate (D) at (-150:2);
28
\coordinate (E) at (-90:2);
29
\coordinate (F) at (-30:2);
30
\coordinate (G) at (0,0);
31
\coordinate (AB) at ($0.5*(A)+0.5*(B)$);
32
\coordinate (BC) at ($0.5*(B)+0.5*(C)$);
33
\coordinate (DE) at ($0.5*(E)+0.5*(D)$);
34
\coordinate (EF) at ($0.5*(E)+0.5*(F)$);
35
\coordinate (AF) at ($0.5*(A)+0.5*(F)$);
36
\coordinate (CD) at ($0.5*(D)+0.5*(C)$);
37
\coordinate (xa) at ($(AB)+(E)$);
38
\coordinate (xb) at ($(BC)+(E)$);
39
\coordinate (xc) at ($(DE)+(B)$);
40
\coordinate (xd) at ($(EF)+(B)$);
41
\draw (A)--(B)--(C)--(D)--(E)--(F)--cycle;
42
\draw (AB)--(B)--(BC)--(xc)--(G)--(xd)--cycle;
43
\draw (G)--(xb)--(DE)--(E)--(EF)--(xa)--cycle;
44
\draw (AF)--(xd)--(G)--(xa)--cycle;
45
\draw (CD)--(xc)--(G)--(xb)--cycle;
46
\draw[part1, very thick] ($0.5*(A)+0.5*(AF)+0.5*(1,0)$)--($0.5*(A)+0.5*(AF)$)--($0.5*(AB)+0.5*(xd)$)--(90:1)--($0.5*(BC)+0.5*(xc)$)--($0.5*(C)+0.5*(CD)$)--($0.5*(C)+0.5*(CD)+0.5*(-1,0)$);
47
\draw[blue, very thick] ($0.5*(F)+0.5*(AF)+0.5*(1,0)$)--($0.5*(F)+0.5*(AF)$)--($0.5*(EF)+0.5*(xa)$)--(-90:1)--($0.5*(DE)+0.5*(xb)$)--($0.5*(D)+0.5*(CD)$)--($0.5*(D)+0.5*(CD)+0.5*(-1,0)$);
48
\draw[part2, very thick] ($0.5*(AB)+0.5*(B)+0.5*(60:1)$)--($0.5*(AB)+0.5*(B)$)--(90:1)--($0.5*(G)+0.5*(xc)$)--($0.5*(xb)+0.5*(CD)$)--($0.5*(D)+0.5*(DE)$)--($0.5*(D)+0.5*(DE)+0.5*(0,-1)$);
49
\draw[red, very thick] ($0.5*(DE)+0.5*(E)+0.5*(-120:1)$)--($0.5*(DE)+0.5*(E)$)--(-90:1)--($0.5*(G)+0.5*(xa)$)--($0.5*(xd)+0.5*(AF)$)--($0.5*(A)+0.5*(AB)$)--($0.5*(A)+0.5*(AB)+0.5*(0,1)$);
50
\draw[green, very thick] ($0.5*(EF)+0.5*(E)+0.5*(-60:1)$)--($0.5*(EF)+0.5*(E)$)--(-90:1)--($0.5*(G)+0.5*(xb)$)--($0.5*(xc)+0.5*(CD)$)--($0.5*(C)+0.5*(BC)$)--($0.5*(C)+0.5*(BC)+0.5*(0,1)$);
51
\draw[part4, very thick] ($0.5*(BC)+0.5*(B)+0.5*(120:1)$)--($0.5*(BC)+0.5*(B)$)--(90:1)--($0.5*(G)+0.5*(xd)$)--($0.5*(xa)+0.5*(AF)$)--($0.5*(F)+0.5*(EF)$)--($0.5*(F)+0.5*(EF)+0.5*(0,-1)$);
52
53
54
\end{tikzpicture}
55
56
\end{document}
57
58