3D 좌표를 사용할 때 xy 평면에 원 그리기

3D 좌표를 사용할 때 xy 평면에 원 그리기

경사진 벽이 있는 xy 평면에 원을 만들려고 합니다. 어떻게 해야 하나요? 기본적으로 베이스보다 개구부가 더 큰 버킷입니다.

\documentclass{article}
\usepackage{tikz, tikz-3dplot} 
\begin{document}
\begin{center}
  \tdplotsetmaincoords{72}{120}
  \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45,
    tdplot_main_coords]
    \draw[->] (0,0,0) -- (3,0,0) node[left, scale = .75] {$x$};
    \draw[->] (0,0,0) -- (0,3,0) node[right, scale = .75] {$y$};
    \draw[->] (0,0,0) -- (0,0,2) node[above, scale = .75] {$z$};        
  \end{tikzpicture}
\end{center}
\end{document}

답변1

이 시도! 여기에서 코드를 가져왔습니다.http://www.texample.net/tikz/examples/dandelin-spheres/그리고 몇 가지 단순화를 했습니다.

\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\begin{document}

\tdplotsetmaincoords{70}{0}
\begin{tikzpicture}[tdplot_main_coords]

\def\h{2.5}% height of cup
\def\r{2}% reason of two radius

\foreach \t in {5,10,...,360}
    \draw[magenta] ({cos(\t)},{sin(\t)},0) --({2*cos(\t)},{2*sin(\t)},{2.0*\h});
\draw[magenta,very thick] (1,0,0) % lower circle
    \foreach \t in {5,10,...,360}
        {--({cos(\t)},{sin(\t)},0)}--cycle;
\draw[magenta,very thick] (1,0,0) % upper circle
    \foreach \t in {5,10,...,360}
    {--({\r*cos(\t)},{\r*sin(\t)},{2*\h})}--cycle;

\end{tikzpicture}

\end{document}

관련 정보