![在不知道圓心和半徑的情況下如何繪製經過四點的球體?](https://rvso.com/image/405352/%E5%9C%A8%E4%B8%8D%E7%9F%A5%E9%81%93%E5%9C%93%E5%BF%83%E5%92%8C%E5%8D%8A%E5%BE%91%E7%9A%84%E6%83%85%E6%B3%81%E4%B8%8B%E5%A6%82%E4%BD%95%E7%B9%AA%E8%A3%BD%E7%B6%93%E9%81%8E%E5%9B%9B%E9%BB%9E%E7%9A%84%E7%90%83%E9%AB%94%EF%BC%9F.png)
基於這張紙,我有一個海倫四面體,是帶有頂點的格子四面體O(0, 0, 0), A(15, -60, 20), B(96, 120, 128), C(63, 84, 56)
,並且
基於 這個答案我試過
\documentclass[tikz,border=2 mm,12pt]{standalone}
\usepackage{fouriernc}
\usepackage{tikz-3dplot-circleofsphere}
\begin{document}
\tdplotsetmaincoords{75}{170}
\begin{tikzpicture}[scale=1/10,line cap=butt,line join=round,tdplot_main_coords,declare function={R= 5*sqrt(451369)/14;%
}]
\path
coordinate (O) at (0, 0, 0)
coordinate (A) at (15, -60, 20)
coordinate (B) at (96, 120, 128)
coordinate (C) at (63, 84, 56)
coordinate (I) at (-1383/14, 90/7, 1528/7)
;
\begin{scope}[tdplot_screen_coords]
\draw[thick] (I) circle (R);
\end{scope}
\end{tikzpicture}
\end{document}
由於維度太大,我無法獲得結果。在不計算球心和半徑座標的情況下,如何繪製經過的球體O, A, B, C
?
答案1
我只是用了一個手持計算器。
\documentclass[tikz,border=2 mm,12pt]{standalone}
\usepackage{tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{75}{170}
\begin{tikzpicture}[scale=1/10,line cap=butt,line join=round,tdplot_main_coords]
\path
coordinate (O) at (0, 0, 0)
coordinate (A) at (15, -60, 20)
coordinate (B) at (96, 120, 128)
coordinate (C) at (63, 84, 56)
coordinate (I) at (-98.79, 12.86, 218.29)
;
\begin{scope}[tdplot_screen_coords]
\draw[thick] (I) circle (239.94);
\end{scope}
;
\draw[thick] (O)--(A) (O)--(B) (O)--(C) (A)--(B) (A)--(C) (B)--(C);
\end{tikzpicture}
\end{document}
答案2
如果您的問題是如何消除dimension too large
錯誤,一個可能的答案是:使用fpu
.
\documentclass[tikz,border=2 mm,12pt]{standalone}
\usepackage{fouriernc}
\usepackage{tikz-3dplot-circleofsphere}
\usetikzlibrary{fpu}
\def\pgfmathsetmacroFPU#1#2{\begingroup%
\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
\pgfmathsetmacro{#1}{#2}%
\pgfmathsmuggle#1\endgroup}%
\begin{document}
\tdplotsetmaincoords{75}{170}
\begin{tikzpicture}[scale=1/10,line cap=butt,line join=round,tdplot_main_coords,
%declare function={R= 5*sqrt(451369/(14*14));% }
]
\pgfmathsetmacroFPU{\myR}{5*sqrt(451369)/14}
\path
coordinate (O) at (0, 0, 0)
coordinate (A) at (15, -60, 20)
coordinate (B) at (96, 120, 128)
coordinate (C) at (63, 84, 56)
coordinate (I) at (-1383/14, 90/7, 1528/7)
;
\begin{scope}[tdplot_screen_coords]
\draw[thick] (I) circle[radius=\myR];
\end{scope}
\end{tikzpicture}
\end{document}