答案1
这些东西相当容易获得。您可以安装自己的坐标系,并使用它来绘制这些向量和对象。我建议从正交系统开始,然后更改一些基向量。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz-3dplot}
\usepackage{amsmath}
\begin{document}
\tdplotsetmaincoords{110}{-20}
\begin{tikzpicture}[>=stealth,
pics/axis/.style={code={
\draw[->] (0,0,0) -- (4,0,0) node[pos=1.1] {$#1_1$};
\draw[->] (0,0,0) -- (0,4,0) node[pos=1.1] {$#1_2$};
\draw[->] (0,0,0) -- (0,0,4) node[pos=1.1] {$#1_3$};
}}]
\begin{scope}[tdplot_main_coords,z={(0,0.3,1)},thick]
\pic{axis=\mathbf{b}};
\draw[->] (0,0,0) -- (3,1.2,3) node[pos=1.1]{$x$};
\draw[dashed] (3,0,0) -- (3,1.2,0) -- (0,1.2,0)
(3,1.2,0) -- (3,1.2,3) -- (0,0,3);
\end{scope}
%
\begin{scope}[xshift=8cm,tdplot_main_coords,x={(1,-0.3,0)},thick,red]
\pic{axis=\mathbf{e}};
\draw[->,black] (0,0,0) -- (3,3,3) node[pos=1.1]{$x$};
\draw[dashed] (3,0,0) -- (3,3,0) -- (0,3,0)
(3,3,0) -- (3,3,3) -- (0,0,3) -- (3,0,3) -- (3,3,3) -- (0,3,3) -- (0,0,3)
(3,0,3) -- (3,0,0) (0,3,3) -- (0,3,0);
\end{scope}
%
\begin{scope}[xshift=8cm,tdplot_main_coords,y={(-0.3,1,0)},z={(0.21,-0.3,1)},thick,blue]
\pic{axis=\mathbf{u}};
\draw[->,black] (0,0,0) -- (3,3,3) node[pos=1.1]{$x$};
\draw[dashed] (3,0,0) -- (3,3,0) -- (0,3,0)
(3,3,0) -- (3,3,3) -- (0,0,3) -- (3,0,3) -- (3,3,3) -- (0,3,3) -- (0,0,3)
(3,0,3) -- (3,0,0) (0,3,3) -- (0,3,0);
\end{scope}
\end{tikzpicture}
\end{document}
如果你希望能够用 Ti 计算某个向量在坐标上的投影钾Z,您可能对以下方面感兴趣实验 3dtools
图书馆. 您需要下载tikzlibrary3dtools.code.tex
某个 LaTeX 可以找到它的地方(例如与编译的文件相同的目录)。库的手动的让您了解它可以用于什么用途。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{3dtools}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[>=stealth,
pics/axis/.style={code={
\draw[->] (0,0,0) -- (4,0,0) node[pos=1.1] {$#1_1$};
\draw[->] (0,0,0) -- (0,4,0) node[pos=1.1] {$#1_2$};
\draw[->] (0,0,0) -- (0,0,4) node[pos=1.1] {$#1_3$};
}},
pics/projections/.style={code={
\pgfmathsetmacro{\myx}{TD("(1,0,0)o#1")}
\pgfmathsetmacro{\myy}{TD("(0,1,0)o#1")}
\pgfmathsetmacro{\myz}{TD("(0,0,1)o#1")}
\draw[pic actions] #1 -- (\myx,\myy,0) -- (0,\myy,0)
(\myx,\myy,0) -- (\myx,0,0) -- (\myx,0,\myz)
(0,\myy,0) -- (0,\myy,\myz)
#1 -- (\myx,0,\myz) -- (0,0,\myz) -- (0,\myy,\myz) -- #1;
}},3d/install view={phi=-20,psi=0,theta=110}]
\begin{scope}[z={(0,0.3,1)},thick]
\pic{axis=\mathbf{b}};
\draw[->] (0,0,0) -- (3,1.2,3) node[pos=1.1]{$x$};
\draw[dashed] (3,0,0) -- (3,1.2,0) -- (0,1.2,0)
(3,1.2,0) -- (3,1.2,3) -- (0,0,3);
\end{scope}
%
\begin{scope}[xshift=8cm,x={(1,-0.3,0)},thick,red]
\pic{axis=\mathbf{e}};
\draw[->,black] (0,0,0) -- (3,3,3) coordinate (x) node[pos=1.1]{$x$};
\pic[dashed] {projections=(x)};
\end{scope}
%
\begin{scope}[xshift=8cm,y={(-0.3,1,0)},z={(0.21,-0.3,1)},thick,blue]
\pic{axis=\mathbf{u}};
\draw[->,black] (0,0,0) -- (3,3,3) coordinate (x') node[pos=1.1]{$x$};
\pic[dashed] {projections=(x')};
\end{scope}
\end{tikzpicture}
\end{document}