[pstricks] Designing the US Flag with PSTricks
Juergen Gilg
gilg at acrotex.net
Thu Oct 25 08:54:09 CEST 2012
Dear List,
>
> is there anybody within the list, who already investigated some time
> in generating the US Flag with PSTricks in the prescribed dimensions
> and prescribed colors?
>
on private email i received a link where the necessary proportions are
described:
http://www.usflag.org/flagspecs.html
Here a possible result in PSTricks for anybody who is interested:
\documentclass{article}
\usepackage{pstricks,pst-eucl,pstricks-add}
\definecolor{USred}{HTML}{B22234}
\definecolor{USblue}{HTML}{3C3B6E}
\begin{document}
\psscalebox{0.5}{%
\begin{pspicture}(0,0)(19,10)
%% White Background = Proportion of the flag
\psframe[fillstyle=solid,fillcolor=white,linecolor=white](0,0)(19,10)
%% 7 red stripes: 13 stripes alternating red (7) and white (6)
\multido{\rA=0+1.538}{7}{%
\rput(0,\rA){\psframe[fillstyle=solid,fillcolor=USred,linecolor=USred](0,0)(!19
10 13 div)}
}
%%Blue rectangle in the upper left (Union)
\psframe[fillstyle=solid,fillcolor=USblue,linecolor=USblue](!0 6 13 div
10 mul)(!2 5 div 19 mul 10)
%%PENTAGRAMM
\def\star{%
\psset{PointSymbol=none,PointName=none}
\def\outer{0.308}
\pnode(\outer;90){A}
\pnode(\outer;162){B}
\pnode(\outer;234){C}
\pnode(\outer;306){D}
\pnode(\outer;18){E}
\pstInterLL{A}{C}{B}{E}{A1}
\pstInterLL{A}{C}{B}{D}{B1}
\pstInterLL{B}{D}{C}{E}{C1}
\pstInterLL{C}{E}{D}{A}{D1}
\pstInterLL{B}{E}{D}{A}{E1}
\pspolygon[fillstyle=solid,fillcolor=white,linecolor=white]
(A)(A1)(B)(B1)(C)(C1)(D)(D1)(E)(E1)
}
%% Arrangment of the stars
%% 5 lines with 6 stars
\multido{\rV=9.462+-1.076}{5}{%
\multido{\rL=0.633+1.266}{6}{%
\rput(\rL,\rV){\star}
}}
%% 4 lines with 5 stars
\multido{\rV=8.924+-1.076}{4}{%
\multido{\rL=1.266+1.266}{5}{%
\rput(\rL,\rV){\star}
}}
\end{pspicture}
}
\end{document}
Best regards,
Jürgen
--
Jürgen Gilg
Austr. 59
70376 Stuttgart
tel 0711 59 27 88
email gilg at acrotex.net
More information about the PSTricks
mailing list