marmotghost / tikz-3dtools

Experimental library for 3d operations with TikZ
8 stars 0 forks source link

Is this a bug? #1

Closed minhthien2016 closed 3 years ago

minhthien2016 commented 3 years ago
\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\usepackage{fouriernc}
\usepackage[utf8]{vietnam}
\usetikzlibrary{calc,3dtools}% https://github.com/marmotghost/tikz-3dtools
\begin{document}
\begin{tikzpicture}[3d/install view={phi=130,theta=70,psi=0},line cap=butt,line join=round,c/.style={circle,fill,inner sep=1pt},
declare function={a=4;}]
\path
(a,a,a) coordinate (A)
(a,-a,-a) coordinate (B)
(-a,a,-a) coordinate (C)
(-a,-a,a) coordinate (D)
;
\path pic[red,dashed]{3d incircle={%
A={(A)},B={(B)},C={(C)},center name=I}};
\path pic[blue]{3d circle through 3 points={%
A={(A)},B={(B)},C={(C)},center name=I'}};
\draw[3d/visible] (D) -- (B) -- (C) -- (D);
\draw[3d/hidden] (A) -- (B) (A) -- (C) (A) -- (D) (D) -- (I);
\path foreach \p/\g in {A/-90,B/-90,C/-90,D/90,I/180}
{(\p)node[c]{}+(\g:2.5mm) node{$\p$}};
\end{tikzpicture}
\end{document}
marmotghost commented 3 years ago

I think that with the latest version of the library there is no problem. But it is true that with the earlier versions there was a dimension too large error. This error was there because I was not using FPU to the extent I could, especially in the routines that were added early. Anyway, I think that the issue is resolved with yesterday's update.