平行四边形TikZ作图

时间:2023-03-08 20:23:57
  %!TEX program = pdflatex
\documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz}
\usepackage{mathpazo} \usetikzlibrary{arrows}
\usetikzlibrary{decorations.markings} \begin{document}
\begin{tikzpicture}[x=.5cm,y=.5cm]
\draw [<->,>=stealth'] (0,8) node [label = left:{$y$}]{} -- (0,0) -- (12,0) node[label = below:{$x$}]{};
grid[xstep=.5cm, ystep=.5cm] (,);
\draw (,) -- (5*1.414,0) -- (5+5*1.414,5) -- (5,5) -- cycle;
\draw[fill=green!] (,) -- (5*1.414,0) -- (5+5*1.414,5) -- (5,5) -- cycle;
\draw (,)node[label = below:{$(,)$}]{};
\draw (*1.414,)node[label = below:{$(\sqrt{},)$}]{};
\draw (+*1.414,)node[label = above:{$(\sqrt{}+,)$}]{};
\draw (,)node[label = above:{$(,)$}]{};
\end{tikzpicture}
\end{document}

Parallelogram Drawing