我对\tdplotdrawarc
中的有一个问题TikZ
。请考虑以下代码片段:
\documentclass{article}
\usepackage{tikz,tikz-3dplot}
\usetikzlibrary{intersections,fadings,decorations.pathreplacing} % interesection is not needed
%\usetikzlibrary{shadows.blur}
\begin{document}
\tdplotsetmaincoords{70}{110}
\begin{tikzpicture}[tdplot_main_coords]
\draw[thick,->] (0,0,0) -- (3,0,0) node[anchor=north east]{$x$};
\draw[thick,->] (0,0,0) -- (0,3,0) node[anchor=north west]{$y$};
\draw[thick,->] (0,0,0) -- (0,0,3) node[anchor=south]{$z$};
\pgfmathsetmacro{\ax}{1}
\pgfmathsetmacro{\ay}{0}
\pgfmathsetmacro{\az}{1}
\pgfmathsetmacro{\axx}{0}
\pgfmathsetmacro{\ayy}{1}
\pgfmathsetmacro{\azz}{1}
\draw[->,red, thick] (0,0,0) -- (1,1,1) node[anchor=west]{$\vec{n}$};
\draw[dashed,red] (0,0,0) -- (1,0,1);
\draw[dashed,red] (0,0,0) -- (1,0,0) -- (1,0,1) -- (0,0,0);
\draw[dashed, black] (0,0,0) -- (1,1,0) -- (1,1,1);
\draw[dashed, black] (1,1,0) -- (1,0,0);
\draw[fill=red,opacity=0.1] (-3,-3,0) -- (-3,3,0) -- (3,3,0) -- (3,-3,0) -- cycle;
\tdplotdrawarc[tdplot_main_coords,->]{(0,0,0)}{1}{0}
{45}{anchor=east}{$\alpha$}
\end{tikzpicture}
\end{document}
我想要做的是这样的:
但我不想使用:
\tdplotgetpolarcoords{\ax}{\ay}{\az}
\tdplotsetthetaplanecoords{\tdplotresphi}
\tdplotdrawarc[tdplot_rotated_coords]{(0,0,0)}{1}{0}
{\tdplotrestheta}{anchor=east}{$\alpha$}
绘制圆弧,但坚持使用笛卡尔坐标。这可能吗?如果可以,怎么做?