Fork me on GitHub

平行四边形TikZ作图

 1  %!TEX program = pdflatex
 2 \documentclass[varwidth=true, border=2pt]{standalone}
 3 
 4 \usepackage{tikz}
 5 \usepackage{mathpazo}
 6 
 7 \usetikzlibrary{arrows}
 8 \usetikzlibrary{decorations.markings}
 9 
10 \begin{document}
11 \begin{tikzpicture}[x=.5cm,y=.5cm]
12 \draw [<->,>=stealth'] (0,8) node [label = left:{$y$}]{} -- (0,0) -- (12,0) node[label = below:{$x$}]{};
13     grid[xstep=.5cm, ystep=.5cm] (4,4);
14     \draw (0,0) -- (5*1.414,0) -- (5+5*1.414,5) -- (5,5) -- cycle;
15     \draw[fill=green!10] (0,0) -- (5*1.414,0) -- (5+5*1.414,5) -- (5,5) -- cycle;
16     \draw (0,0)node[label = below:{$(0,0)$}]{};
17     \draw (5*1.414,0)node[label = below:{$(\sqrt{2},0)$}]{};
18     \draw (5+5*1.414,5)node[label = above:{$(\sqrt{2}+1,1)$}]{};
19     \draw (5,5)node[label = above:{$(1,1)$}]{};
20   \end{tikzpicture}
21 \end{document}
Parallelogram Drawing

 

posted @ 2015-12-24 10:22  小奔奔  阅读(657)  评论(0编辑  收藏  举报