我有以下图片:
我尝试用 tikz 来绘制它:
\documentclass[tikz,border=1mm,usenames,dvipsnames]{standalone}
\usepackage{tikz, pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{patterns}
\usetikzlibrary{calc,matrix}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shapes}
\definecolor{amber}{rgb}{1.0, 0.49, 0.0}
\definecolor{antique}{rgb}{0.8, 0.58, 0.46}
\definecolor{pastelorange}{rgb}{1.0, 0.7, 0.28}
\begin{document}
\begin{tikzpicture}
\node[trapezium, draw, very thin, trapezium left angle=120, trapezium right angle=60] at (0,0) {};
\end{tikzpicture}
\end{document}
结果是:
我不能做的事情:
- 镜像物体
- 用彩色条纹填充(孵化)
- 制作箭头(矢量)
是否可以对 3D 对象(平行六面体)执行相同操作?
谢谢大家!
答案1
\documentclass[tikz,border=1mm,usenames,dvipsnames]{standalone}
% ateb https://tex.stackexchange.com/a/700945/: addaswyd o gwestiwn JoudaBouda: https://tex.stackexchange.com/q/700934/
\usepackage{tikz}
\usetikzlibrary{patterns,patterns.meta}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\node (p)[pattern={Lines[angle=120,line width=.1pt,distance=.5pt]}, pattern color=gray, trapezium, draw, very thin, trapezium right angle=120] at (0,0) {};
\draw [-{Stealth[length=1pt]},ultra thin] (p.bottom left corner) ++(45:.5\pgflinewidth) coordinate (a) -- ([xshift=-.5\pgflinewidth,yshift=.5\pgflinewidth]p.bottom right corner);
\draw [-{Stealth[length=1pt]},ultra thin] (a) -- ([xshift=.5\pgflinewidth,yshift=-.5\pgflinewidth]p.top left corner);
\end{tikzpicture}
\end{document}
答案2
% !TEX TS-program = lualatex
\documentclass{standalone}
\usepackage{tkz-euclide}
\usepackage{tkz-elements}
\usetikzlibrary{patterns,patterns.meta}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tkzelements}
z.A = point: new(0,0)
z.B = point: new(5,0)
z.C = point: new(1,4)
T.ABC = triangle: new (z.A,z.B,z.C)
z.D = T.ABC : parallelogram ()
\end{tkzelements}
\begin{tikzpicture}
\tkzGetNodes
\tkzDrawPolygon(A,...,D)
\tkzFillPolygon[pattern={Lines[angle=60,distance=8pt]},
pattern color=black](A,...,D)
\tkzDrawSegments[-stealth,line width=1pt](A,B A,D)
\end{tikzpicture}
\end{document}