add tag
Anonymous 1123
I am trying draw figure of this problem
![ScreenHunter 28.png](/image?hash=e9cf31cdd0345532962c30fd096dfe62c4379f59b26dde1a16e84f28aa6da151)
I tried
```
\documentclass[tikz,border=3mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3dtools,intersections}

\begin{document}
\tdplotsetmaincoords{60}{100}
\begin{tikzpicture}[scale=2,tdplot_main_coords,line join = round, line cap = round, declare function={R=1;}]
\path
(0,0,0)	coordinate (A)  
(0,2,0)	coordinate (B)   
(1,{sqrt(3)},0)	coordinate (C)
(1/3,{(2 +sqrt(3))/3}, {sqrt(33)/3}) coordinate (S)
[3d coordinate = {(G) = 0.333*(A) + 0.333*(B) + 0.333*(C)}];
\draw[3d/screen coords,,ball color=cyan!80, opacity=0.8] (A) circle[radius=R];
\draw[3d/screen coords,ball color=red!80, opacity=0.8] (B) circle[radius=R];
\draw[3d/screen coords,ball color=green!80, opacity=0.8] (C) circle[radius=R];
\draw[3d/screen coords,ball color=purple!80, opacity=0.8] (S) circle[radius=R];
\foreach \p in {A,B,C,G,S}
\draw[fill=black] (\p) circle (0.5pt);
\foreach \p/\g in {A/90,B/-90,C/-90,G/-90,S/90}
\path (\p)+(\g:1.5mm) node{$\p$};
\draw[3d/hidden] (A) -- (B) -- (C) -- cycle;
\end{tikzpicture}
\end{document}
```
My code seems incorrect. 
![ScreenHunter 29.png](/image?hash=380f289954fb330728715e4823e5225baf158973cdb4ba21b98e9d701593a516)

I know that

![ScreenHunter 27.png](/image?hash=339bbeca46ac4a64cc6407d2ed2bbc62ad54ab0a26d9eb2e19b5d6f23d0457ad)

![ScreenHunter 26.png](/image?hash=33da4d3f1333a935a49c08a2e89b6c75541fd15a49aad6e635c16275b31b09d2)
Top Answer
user 3.14159
The correct solution is (E), I think. Notice that to compile this code you need the latest version of [`3dtools`](https://github.com/marmotghost/tikz-3dtools).
```
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{3dtools}%https://github.com/marmotghost/tikz-3dtools
\begin{document}
\pgfdeclarelayer{background} 
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground} 
\foreach \Angle in {5,15,...,355}
{\begin{tikzpicture}[same bounding box=A]
 \begin{scope}[3d/install view={phi=\Angle,psi=0,theta=60}]
  \pgfmathsetmacro{\myr}{sqrt(1+tan(30)*tan(30))}
  \pgfmathsetmacro{\myh}{2*sin(acos(\myr/2))}
  \pgfmathsetmacro{\myt}{2*sqrt(6)}
  \pgfmathsetmacro{\mys}{2+\myt}
  \pgfmathsetmacro{\myd}{(1+sqrt(6))/cos(30)}
  \pgfmathsetmacro{\myH}{sqrt(2/3)*\mys}
  \path (-1,{-tan(30)},1) coordinate (C1)  (1,{-tan(30)},1) coordinate (C2) 
   (0,{tan(60)-tan(30)},1) coordinate (C3) (0,0,{1+\myh}) coordinate (C4)
   foreach \X in {1,2,3}
   {({\myd*cos(90+\X*120)},{\myd*sin(90+\X*120)},0) coordinate (v\X)}
   (0,0,{\myH}) coordinate (v4);
% cross check   
%   \pgfmathsetmacro{\mydAB}{tddistance("(v1)","(v2)")}
%   \pgfmathsetmacro{\mydAD}{tddistance("(v1)","(v4)")}
%   \typeout{\mydAB,\mydAD}
  \let\mylistd\empty
  \tikzset{add screen depth/.code={%
  	\pgfmathsetmacro{\mycoor}{TD("(C##1)")}%
 	\pgfmathsetmacro{\mysd}{screendepth(\mycoor)}%
 	\ifx\mylistd\empty
 	 \edef\mylistd{\mysd}%
 	\else
 	 \edef\mylistd{\mylistd,\mysd}%
 	\fi}}
  \tikzset{add screen depth/.list={1,...,4}}
  \pgfkeys{/my lists/.cd,
	 my initial array/.is array={\mylistd}, 
	 my values/.initial=\pgfkeysvalueof{/my lists/my initial array/content},%
	 my values/.sort numeric list={\temp}{\templ},% sort yields sorted list and index
	 my sorted array/.is array/.expanded={\temp}, 
	 my index machinery/.is array/.expanded={\templ}}%
  \tikzset{ball 1/.style={ball color=red},ball 2/.style={ball color=blue},
  	ball 3/.style={ball color=green!70!black},ball 4/.style={ball color=orange}}
  \foreach \X in \templ
  {
  \shade[3d/screen coords,ball \X] (C\X) circle[radius=1];}
  		\tikzset{3d/polyhedron/.cd,fore layer=foreground,back layer=background,
			face edges/.style={},%
			back/.style={3d/hidden,fill=none},
			fore/.style={3d/visible,solid,fill=none,3d/polyhedron/edges have complete dashes=false},
			complete dashes,
			O={(0,0,1)},
			draw face with corners={{(v1)},{(v2)},{(v3)}},
			draw face with corners={{(v1)},{(v2)},{(v4)}},
			draw face with corners={{(v1)},{(v3)},{(v4)}},
			draw face with corners={{(v2)},{(v3)},{(v4)}}
			}

 \end{scope} 
\end{tikzpicture}}
\end{document}
```
![ani.gif](/image?hash=480428d66ffc58f72d95954c05c4420472cc44c621bcdeeba60e994c44e82f36)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.