3

I want to draw the circle passing three points S, B, D like this picture enter image description here

I tried by using 3dtools but I cann't obtain the result. My code

\documentclass[tikz,border=1 mm,12pt]{standalone}
\usepackage{fouriernc}
\usepackage{tikz-3dplot-circleofsphere}
\usetikzlibrary{backgrounds,3dtools}
\begin{document}
\tdplotsetmaincoords{70}{73}
    \begin{tikzpicture}[scale=1,tdplot_main_coords,declare function={R=25*sqrt(78)*(1/52);r=7*sqrt(3)*(1/3);Angle=acos(r/R);%
    }]
    \path (0,0,0) coordinate (O)
    (-3/2, {-13*sqrt(3)*(1/6)}, 0) coordinate (A) 
    (3/2, {-13*sqrt(3)*(1/6)}, 0) coordinate (B) 
    (4, {(1/3)*sqrt(3)}, 0) coordinate (C) 
    (0, 0, {(1/3)*sqrt(78)}) coordinate (S) 
    (0, 0, {-23*sqrt(78)*(1/156)}) coordinate (T)
    (-3/2, {13*sqrt(3)*(1/6)}, 0) coordinate (D)
    ;
    \begin{scope}[tdplot_screen_coords]
    \draw[thick] (T) circle (R);
    \end{scope}
    \begin{scope}[shift={(T)}]
    \tdplotCsDrawLatCircle[tdplotCsFront/.style={thick}]{R}{{Angle}}
    \end{scope}
    \foreach \p in {A,B,C,D,S,O,T}
    \draw[fill=black] (\p) circle (1.5pt);
    \foreach \p/\g in {A/155,C/-90,B/-60,D/45,S/160,O/-90,T/-90}
    \path (\p)+(\g:3mm) node{$\p$};
    \foreach \X in {A,B,C,O,D} \draw[dashed] (\X) -- (S); 
    \draw[dashed] (A) -- (B) -- (C) -- cycle (B) -- (D);
    \path[overlay,3d coordinate={(nSBD)=(S)-(B)x(S)-(D)}];
    \pgfmathsetmacro{\myangle}{atan(TDy("nSBD")/TDx("nSBD"))}
    \begin{scope}[shift={(T)}]
    \tdplotCsDrawGreatCircle[tdplotCsFront/.style={thick,blue}]{R}{90}{\myangle}
    \end{scope}
    \end{tikzpicture}
\end{document}

I got

enter image description here

How can I get the correct result?

2

I am not sure if many can follow this discussion. The package tikz-3dplot-circleofsphere can be found here, and the 3dtools library here. The issue is you changed the order of arguments. 90 has to come last:

\tdplotCsDrawGreatCircle[tdplotCsFront/.style={thick,blue}]{R}{\myangle}{90} 

\documentclass[tikz,border=1 mm,12pt]{standalone}
\usepackage{fouriernc}
\usepackage{tikz-3dplot-circleofsphere}
\usetikzlibrary{backgrounds,3dtools}
\begin{document}
\tdplotsetmaincoords{70}{73}
    \begin{tikzpicture}[scale=1,tdplot_main_coords,declare function={R=25*sqrt(78)*(1/52);r=7*sqrt(3)*(1/3);Angle=acos(r/R);%
    }]
    \path (0,0,0) coordinate (O)
    (-3/2, {-13*sqrt(3)*(1/6)}, 0) coordinate (A) 
    (3/2, {-13*sqrt(3)*(1/6)}, 0) coordinate (B) 
    (4, {(1/3)*sqrt(3)}, 0) coordinate (C) 
    (0, 0, {(1/3)*sqrt(78)}) coordinate (S) 
    (0, 0, {-23*sqrt(78)*(1/156)}) coordinate (T)
    (-3/2, {13*sqrt(3)*(1/6)}, 0) coordinate (D)
    ;
    \begin{scope}[tdplot_screen_coords]
    \draw[thick] (T) circle (R);
    \end{scope}
    \begin{scope}[shift={(T)}]
    \tdplotCsDrawLatCircle[tdplotCsFront/.style={thick}]{R}{{Angle}}
    \end{scope}
    \foreach \p in {A,B,C,D,S,O,T}
    \draw[fill=black] (\p) circle (1.5pt);
    \foreach \p/\g in {A/155,C/-90,B/-60,D/45,S/160,O/-90,T/-90}
    \path (\p)+(\g:3mm) node{$\p$};
    \foreach \X in {A,B,C,O,D} \draw[dashed] (\X) -- (S); 
    \draw[dashed] (A) -- (B) -- (C) -- cycle (B) -- (D);
    \path[overlay,3d coordinate={(nSBD)=(S)-(B)x(S)-(D)}];
    \pgfmathsetmacro{\myangle}{atan(TDy("nSBD")/TDx("nSBD"))}

    %\node{\pgfmathparse{TD("(nSBD)")}\pgfmathprintvector\pgfmathresult};
    \begin{scope}[shift={(T)}]
    \tdplotCsDrawGreatCircle[tdplotCsFront/.style={thick,blue}]{R}{\myangle}{90}
    \end{scope}
    \end{tikzpicture}
\end{document}

enter image description here

  • @minhthien_2016 Oh, sorry! Fixed. (Assuming you mean S B D, for which you compute the normal. – Schrödinger's cat Oct 2 at 4:29
  • @minhthien_2016 This is only to check what's going on. It should be reasonable accurate, at least the blue curve looks good to me. – Schrödinger's cat Oct 2 at 4:48
  • 1
    I agree with you. Another way for my question is \begin{scope}[shift={(T)}] \tdplotCsDrawLonCircle[tdplotCsFront/.style={thick}]{R}{\myangle} \end{scope} – minhthien_2016 Oct 2 at 5:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.