Quốc kỳ Philippines

Description

Mô tả quốc kỳ Philippines https://en.wikipedia.org/wiki/Flag_of_the_Philippines

PDF https://www.dropbox.com/s/3apvugqdkai79pj/phil_flag.pdf?dl=0

Mã TikZ

by Le Huy Tien

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
</span>

documentclass[tikz,border=5mm]{standalone}

usetikzlibrary{calc}

usetikzlibrary{shapes.geometric
} % nốt ngôi sao

definecolor{philblue}{RGB}{0,56,168}

definecolor{philred}{RGB}{206,17,38}

definecolor{philyellow}{RGB}{252,209,22}

begin{document
}

% Gốc O ở giữa cạnh trái lá cờ

begin{tikzpicture}

pagecolor{gray!50
}

fill[philblue] (0,0) rectangle (18,4.5);

fill[philred] (0,0) rectangle (18,-4.5);

fill[white] (0,-4.5) coordinate (A)--(0,4.5) coordinate (B)

--([turn]-120:9) coordinate (C)--cycle;

%coordinate (G) at (barycentric cs:A=1,B=1,C=1);

&nbsp;

path

(C)--++(180:1.4) coordinate (S0)

(B)--++(-60:1.4) coordinate (S1)

(A)--++(60:1.4) coordinate (S-1);

foreach i in {0,1,-1}

draw (Si) node[star,minimum size=1cm,fill=philyellow,star point ratio=2.5,rotate=-90+120*i]{
};

&nbsp;

% Vẽ 3 tia hào quang quanh góc 45

defg{3.75} % góc độ dầy tia hào quang

pgfmathsetmacro{a}{1.9/sqrt(2)} % nửa cạnh hình vuông clip

pgfmathsetmacro{s}{acos(a/1.7)} % góc tia hào quang ngắn

&nbsp;

% 4 hào quang chéo

begin{scope}[shift={(2.8,0)},fill=philyellow]

clip (45:1.9cm) rectangle (225:1.9cm);

foreach i in {0,2,4,6}{

begin{scope}[rotate=i*45]

fill (0,0)--(45-g:1.9)--(45+g:1.9)--cycle;

fill (0,0)--(s:1.7)--(s-g:1.7)--cycle;

fill[rotate=-45,xscale=-1,rotate=45] (0,0)--(s:1.7)--(s-g:1.7)--cycle;

end{scope}

}

fill (0,0) circle(.9);

end{scope
}

&nbsp;

% 4 hào quang ngang dọc (chỉ thêm rotate=45)

begin{scope}[shift={(2.8,0)},fill=philyellow,rotate=45]

clip (45:1.9cm) rectangle (225:1.9cm);

foreach i in {0,2,4,6}{

begin{scope}[rotate=i*45]

fill (0,0)--(45-g:1.9)--(45+g:1.9)--cycle;

fill (0,0)--(s:1.7)--(s-g:1.7)--cycle;

fill[rotate=-45,xscale=-1,rotate=45] (0,0)--(s:1.7)--(s-g:1.7)--cycle;

end{scope}

}

fill (0,0) circle(.9);

end{scope}

end{tikzpicture
}

&nbsp;

% Mô tả cờ Phil

begin{tikzpicture}[every node/.style={font=bfseries}]

%selectcolormodel{gray}

pagecolor{white}

fill[gray] (0,0) rectangle (18,4.5);

fill[gray!50] (0,0) rectangle (18,-4.5);

fill[white] (0,-4.5) coordinate (A)--(0,4.5) coordinate (B)

--([turn]-120:9) coordinate (C)--cycle;

&nbsp;

path

(C)--++(180:1.4) coordinate (S0)

(B)--++(-60:1.4) coordinate (S1)

(A)--++(60:1.4) coordinate (S-1);

foreach i in {0,1,-1}

draw (Si) node[star,minimum size=1cm,fill=gray!50,star point ratio=2.5,rotate=-90+120*i]{
} circle(.5cm);

draw

(C)--(S0)--([turn]0:1cm)

(B)--(S1)--([turn]0:1cm)

(A)--(S-1)--([turn]0:1cm);

&nbsp;

% Vẽ 3 tia hào quang quanh góc 45

defg{3.75} % góc độ dầy tia hào quang

pgfmathsetmacro{a}{1.9/sqrt(2)} % nửa cạnh hình vuông clip

pgfmathsetmacro{s}{acos(a/1.7)} % góc tia hào quang ngắn

&nbsp;

% 4 hào quang chéo

begin{scope}[shift={(2.8,0)},fill=gray!50]

begin{scope
} % chỉ dùng chú giải hào quang dài 8 và góc 3.75

clip (45:1.9cm) rectangle (225:1.9cm);

foreach i in {0,2,4,6}{

begin{scope}[rotate=i*45]

fill (0,0)--(45-g:1.9)--(45+g:1.9)--cycle;

fill (0,0)--(s:1.7)--(s-g:1.7)--cycle;

fill[rotate=-45,xscale=-1,rotate=45] (0,0)--(s:1.7)--(s-g:1.7)--cycle;

end{scope}

}

fill (0,0) circle(.9);

end{scope
}

&nbsp;

% chú giải hào quang dài 8 và góc 3.75

draw[|-|] (s:.9)--++(s:.8) node[pos=.7,below]{8};

end{scope
}

&nbsp;

% 4 hào quang ngang dọc (chỉ thêm rotate=45)

begin{scope}[shift={(2.8,0)},fill=gray!50,rotate=45]

clip (45:1.9cm) rectangle (225:1.9cm);

foreach i in {0,2,4,6}{

begin{scope}[rotate=i*45]

fill (0,0)--(45-g:1.9)--(45+g:1.9)--cycle;

fill (0,0)--(s:1.7)--(s-g:1.7)--cycle;

fill[rotate=-45,xscale=-1,rotate=45] (0,0)--(s:1.7)--(s-g:1.7)--cycle;

end{scope}

}

fill (0,0) circle(.9);

end{scope}

&nbsp;

&nbsp;

draw[-|] (0,0)--(.9,0) node[below,midway]{9};

draw[-|] (.9,0)--++(1,0) node[below,midway]{10};

draw[-|] (1.9,0)--++(1.8,0) node[below,midway]{18};

&nbsp;

draw (0,-4.5) rectangle (18,4.5);

draw[|-|,xshift=5mm] (18,-4.5)--(18,0) node[midway,right]{45};

draw[|-,xshift=5mm] (18,4.5)--(18,0) node[midway,right]{45};

draw[|-|,yshift=5mm] (0,4.5)--(18,4.5) node[midway,above]{180};

&nbsp;

draw[|-|] ([yshift=8mm]C)--++(-.9,0) node[midway,above]{9} coordinate (D);

draw[-|] (D)--++(-1,0) node[midway,above]{10};

&nbsp;

draw[|-|] ([shift={(-60:3mm)}]A)--([shift={(-60:3mm)}]C) node[midway,below,sloped]{90};

&nbsp;

end{tikzpicture}

end{document
}

<span style="color: #6d6d6d;">

64