Advertisement
Guest User

Untitled

a guest
May 2nd, 2013
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 0.60 KB | None | 0 0
  1. \documentclass{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{calc}
  4. \begin{document}
  5. \begin{tikzpicture}
  6. \coordinate (r) at (5cm,0cm);
  7. \coordinate (h) at (0cm,5cm);
  8. \foreach \x [evaluate=\x as \xeval using 2^\x] in {1,2,...,7}
  9. \pgfmathparse{\xeval-1}\foreach \y in {0,1,...,\pgfmathresult}
  10. \pgfmathparse{\x*10}
  11.     \filldraw[fill=blue!\pgfmathresult!white,draw=black]  ($ {\y/\xeval}*(r)+(h)-{1/\xeval}*(h)-{\y/\xeval}*(h) $) rectangle
  12.            ($ {1/(2*\xeval)}*(r)+{\y/\xeval}*(r)+(h)-{1/(2*\xeval)}*(h)-{\y/\xeval}*(h)$);
  13. \draw (0,0) rectangle (2.5cm,2.5cm);
  14. \end{tikzpicture}
  15. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement