title: Drawing an arc between two 3D points
body: <p>I am trying to draw composite 3D shapes, and I am struggling drawing arcs between two 3D points. In the example below I would like to draw a dashed arc of 180 degrees between from D to H clockwise, and a solid arc of 180 degrees from D to H anti-clockwise. However, when I try</p>
  
  <pre><code>\draw (D)  arc[radius=\R, start angle=180, end angle=0];
  </code></pre>
  
  <p>I don't get the arc I want. Below is the code I have so far:</p>
  
  <pre><code>\documentclass{article}
  \usepackage{tikz}
  \usepackage{tikz-3dplot}
  
  \begin{document}
  \tdplotsetmaincoords{65}{-43}
  \begin{center}
  \begin{tikzpicture}[
      scale=1,
      tdplot_main_coords]
      \def\R{2}
      \def\h{6}
      \coordinate (A) at ({\R*cos(0)},{\R*sin(0)},0);
      \coordinate (B) at ({\R*cos(45)},{\R*sin(45)},0);
      \coordinate (C) at ({\R*cos(90)},{\R*sin(90)},0);    
      \coordinate (D) at ({\R*cos(135)},{\R*sin(135)},0);
      \coordinate (E) at ({\R*cos(180)},{\R*sin(180)},0);
      \coordinate (F) at ({\R*cos(225)},{\R*sin(225)},0);
      \coordinate (G) at ({\R*cos(270)},{\R*sin(270)},0);
      \coordinate (H) at ({\R*cos(315)},{\R*sin(315)},0);
      \coordinate (O) at (0,0,0);
      \coordinate (O') at (0,0,\h);
      \coordinate (O'') at (0,0,-\h);
      \foreach \i in {A,B,C}{
          \draw[dashed] (\i) -- (O');
      \node at (\i) [above]{$\i$};}
      \foreach \i in {D,E,F,G,H}{
          \draw (\i) -- (O');
      \node at (\i) [below]{$\i$};}   
      \draw[red] (O) circle (\R);
      \draw[red] (D) -- (O'') -- (H);
      \draw[dashed] (H) -- (A) -- (B) -- (C) -- (D);
      \draw (D) -- (E) -- (F) -- (G) -- (H);
      \node at (O') [above]{$O'$};
      \node at (O'') [below,thick,red]{$O''$};
      \end{tikzpicture}
  \end{center}
  \end{document}
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0Vrse.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Vrse.png" alt="Composite shape."></a></p>