有什么可能的方法可以满足上述要求吗?我无法在点 (0,1,0) 上绘制一条弧,该弧也经过金字塔上的另一个点,如下所示。
梅威瑟:
\documentclass[12pt, answers]{exam}
\usepackage[a4paper, top=1.9cm, left=2cm, right=2cm, bottom=2.2cm]{geometry}
\usepackage{amsmath}
\usepackage{amssymb,amsthm}
\usepackage{mathtools}
\usepackage{empheq}
\usepackage{setspace}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{tkz-euclide}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{tikz-3dplot}
\usepackage[pdf]{pstricks}
\usepackage{caption}
\begin{document}
\tdplotsetmaincoords{-35}{15}
\begin{tikzpicture}[scale=1.8, ,tdplot_main_coords, rotate=15]
\draw [thick] (0,1,2)--(2,1,2)--(2,1,0)--(0,1,0)--cycle;
\draw[dashed] (1,1,1)--(1,3,0.5);
\draw[thick] (0,1,0)--(1,3,0.5);
\draw[thick] (2,1,2)--(1,3,0.5);
\draw[thick] (2,1,0)--(1,3,0.5);
\draw[thick] (0,1,2)--(1,3,0.5);
\node at (1.3,-2.1,-1)[above]{Figure 3};
\draw[thick] (0,1,0) arc(0:180:0.5);
\end{tikzpicture}
\end{document}
生成的图像:
我想要的图像:
感谢您的帮助!
答案1
如果旋转图形,请将设置值调整为\ang。
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
% defining values for the radius, height, size of the mark and the angle for the partially visible arc.
\def\radius{2}
\def\height{4}
\def\mark{0.2}
\def\ang{68}
\draw[thick] (-\radius,0,\radius) -- (\radius,0,\radius) -- (\radius,0,-\radius);
\draw[thick, densely dashed,black!80] (\radius,0,-\radius) -- (-\radius,0,-\radius) -- (-\radius,0,\radius);
\node[left] at (-\radius,0,\radius) {$A$};
\node[right] at (\radius,0,\radius) {$B$};
\node[right] at (\radius,0,-\radius) {$C$};
\node[above] at (-\radius-0.3,0,-\radius) {$D$};
\node[above] at (0,\height,0) {$V$};
\draw[densely dashed] (0,0,0) -- (0,\height,0);
\draw (-\mark,0,-\mark) -- (\mark,0,\mark);
\draw (\mark,0,-\mark) -- (-\mark,0,\mark);
\draw[thick] (-\radius,0,\radius) -- (0,\height,0) -- (\radius,0,-\radius);
\draw[thick] (\radius,0,\radius) -- (0,\height,0);
\draw[thick, densely dashed,black!80] (0,\height,0) -- (-\radius,0,-\radius);
\node at (0,-2,\radius)[below]{Figure 3};
\begin{scope}[rotate around y=-90,shift={(\radius,0,-\radius)}]
\draw[thick] (0,0,0) arc(0:-180:\radius);
\end{scope}
\begin{scope}[rotate around y=90,shift={(\radius,0,-\radius)}]
\draw[densely dashed, thick,black!80] (0,0,0) arc(0:-180+\ang:\radius);
\end{scope}
\begin{scope}[rotate around y=-90,shift={(\radius,0,\radius)}]
\draw[thick] (0,0,0) arc(0:-\ang:\radius) -- ++(0,0,-2*\radius);
\end{scope}
\end{tikzpicture}
\end{document}