Closed minhthien2016 closed 2 years ago
According to Wikipedia "A regular tetrahedron is a tetrahedron in which all four faces are equilateral triangles.". This does not seem to be the case for the tetrahedron shown in the screen shot.
How about with this line declare function={l12=5;l23=5;l13=5; l14=5;l24=5;l34=5;}
?
I solve this problem
\documentclass[border=2mm,tikz]{standalone}
\usetikzlibrary{calc,3dtools}
\begin{document}
\begin{tikzpicture}[dot/.style={circle,inner sep=1pt,fill},declare function={a=1; l12=6*a;l23=6*a;l13=6*a; l14=6*a;l24=6*a;l34=6*a;},3d/install view={phi=70,theta=70}]
\pgfmathsetmacro{\mytheta}{acos(( l23*l23+ l24*l24-l34*l34)/(2*l23*l24))}
\path (0,0,0) coordinate (v2) (l13,0,0) coordinate (v3)
({l24*cos(\mytheta)},{l24*sin(\mytheta)},0) coordinate (v4);
\path[overlay,3d/aux keys/i1=v1,3d/aux keys/i2=v5,3d/intersection of three spheres={A={(v2)},B={(v3)},C={(v4)}, rA=l12,rB=l13,rC=l14}];
\path[3d/plane through={(v4) and (v2) and (v3) named pABC}];
\path[3d/project={(v1) on pABC}] coordinate (H);
\pgfmathsetmacro{\mybarycenter}{barycenter("(v4),(v2),(v3)")}
\path (\mybarycenter) coordinate (G);
\path[3d/circumcircle center={A={(v4)},B={(v2)},C={(v3)}}] coordinate (T);
\draw[3d/hidden] (v4) -- (v2);
\draw[3d/visible] (v4) -- (v1) -- (v2) -- (v3)-- cycle (v1) -- (v3);
\path foreach \p/\g in {v1/90,v2/-90,v3/-90,v4/90,H/90,G/-90,T/0}
{(\p)node[dot]{}+(\g:3mm) node{$\p$}};
\end{tikzpicture}
\end{document}
Where is wrong in this code about the point G? I think, there points
G, T, H
coincide. Becausev1v2v3v4
is regular tetrahedron.