首页 > 其他 > 详细

平行四边形TikZ作图

时间:2015-12-24 10:32:11      阅读:435      评论:0      收藏:0      [点我收藏+]
技术分享
 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

 

平行四边形TikZ作图

原文:http://www.cnblogs.com/wangshixi12/p/5072258.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!