Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{standalone}
- \usepackage{tikz}
- \usetikzlibrary{calc}
- \begin{document}
- \begin{tikzpicture}
- \coordinate (r) at (5cm,0cm);
- \coordinate (h) at (0cm,5cm);
- \foreach \x [evaluate=\x as \xeval using 2^\x] in {1,2,...,7}
- \pgfmathparse{\xeval-1}\foreach \y in {0,1,...,\pgfmathresult}
- \pgfmathparse{\x*10}
- \filldraw[fill=blue!\pgfmathresult!white,draw=black] ($ {\y/\xeval}*(r)+(h)-{1/\xeval}*(h)-{\y/\xeval}*(h) $) rectangle
- ($ {1/(2*\xeval)}*(r)+{\y/\xeval}*(r)+(h)-{1/(2*\xeval)}*(h)-{\y/\xeval}*(h)$);
- \draw (0,0) rectangle (2.5cm,2.5cm);
- \end{tikzpicture}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement