texlive[52805] Master: tikz-3dtools (15nov19)
commits+karl at tug.org
commits+karl at tug.org
Fri Nov 15 22:38:02 CET 2019
Revision: 52805
http://tug.org/svn/texlive?view=revision&revision=52805
Author: karl
Date: 2019-11-15 22:38:02 +0100 (Fri, 15 Nov 2019)
Log Message:
-----------
tikz-3dtools (15nov19)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/tikz-3dtools/
trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.pdf
trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.tex
trunk/Master/texmf-dist/doc/latex/tikz-3dtools/README.md
trunk/Master/texmf-dist/tex/latex/tikz-3dtools/
trunk/Master/texmf-dist/tex/latex/tikz-3dtools/tikzlibrary3dtools.code.tex
trunk/Master/tlpkg/tlpsrc/tikz-3dtools.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.pdf 2019-11-15 21:37:15 UTC (rev 52804)
+++ trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.pdf 2019-11-15 21:38:02 UTC (rev 52805)
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.tex 2019-11-15 21:38:02 UTC (rev 52805)
@@ -0,0 +1,387 @@
+\documentclass[a4paper]{ltxdoc}
+%\input{pgfmanual-dvipdfm.cfg}
+%\input{../../text-en/pgfmanual-en-main-preamble}
+\usepackage[version=latest]{pgf}
+\usepackage{xkeyval,calc,listings,tikz,fp}
+\usepackage[T1]{fontenc}% big thanks to samcarter!
+\usepackage{makeidx}
+\makeindex
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks=true,
+ linkcolor=blue,
+ filecolor=blue,
+ urlcolor=blue,
+ citecolor=blue,
+ pdfborder=0 0 0,
+}
+\makeatletter % see https://tex.stackexchange.com/q/33946
+\input{pgfmanual.code} %
+\makeatother %
+\input{pgfmanual-en-macros.tex} % link from
+% /usr/local/texlive/2019/texmf-dist/doc/generic/pgf/macros/pgfmanual-en-macros.tex
+% or the equivalent on your installation
+\newenvironment{ltxtikzlibrary}[1]{
+ \begin{pgfmanualentry}
+ \pgfmanualentryheadline{%
+ \pgfmanualpdflabel{#1}{}%
+ \textbf{\tikzname\ Library} \texttt{\declare{#1}}}
+ \index{#1@\protect\texttt{#1} library}%
+ \index{Libraries!#1@\protect\texttt{#1}}%
+ \vskip.25em%
+ {{\ttfamily\char`\\usetikzlibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX\space only}}\\[.5em]
+ \pgfmanualbody
+}
+{
+ \end{pgfmanualentry}
+}
+\def\pgfautoxrefs{1}
+\usetikzlibrary{3dtools}
+\begin{document}
+\title{\tikzname\ 3D Tools}
+\author{tallmarmot}
+\date{v1.0}
+\maketitle
+\section{Manual}
+\begin{ltxtikzlibrary}{3dtools}
+ This library provides additional tools to create 3d--like pictures.
+\end{ltxtikzlibrary}
+
+TikZ has the |3d| and |tpp| libraries which deal with the projections of
+three--dimensional drawings. This library provides some means to manipulate
+the coordinates. It supports linear combinations of vectors, vector and scalar
+products.
+
+\noindent\textbf{Note:} Hopefully this library is only temporary and its
+contents will be absorbed in slightly extended versions of the |3d| and |calc|
+libraries.
+
+\subsection{Coordinate computations}
+\label{sec:3DCoordinateComputations}
+
+
+The |3dtools| library has some options and styles for coordinate computations.
+\begin{key}{/tikz/3d parse}
+ Parses and expression and inserts the result in form of a coordinate.
+\end{key}
+\begin{key}{/tikz/3d coordinate}
+ Allow one to define a 3d coordinate from other coordinates.
+\end{key}
+Both keys support both symbolic and explicit coordinates.
+
+\begin{codeexample}[width=6cm]
+\begin{tikzpicture}
+ \path (1,2,3) coordinate (A)
+ (2,3,-1) coordinate (B)
+ (-1,-2,1) coordinate (C)
+ [3d parse={0.25*(1,2,3)x(B)}]
+ coordinate(D)
+ [3d parse={0.25*(C)x(B)}]
+ coordinate(E);
+ \path foreach \X in {A,...,E}
+ {(\X) node[fill,inner sep=1pt,
+ label=above:$\X$]{}};
+\end{tikzpicture}
+\end{codeexample}
+
+Notice that, as of now, only the syntax |\path (1,2,3) coordinate (A);| works,
+i.e.\ |\coordinate (A) at (1,2,3);| does \emph{not} work, but leads to error
+messages.
+
+\begin{codeexample}[width=6cm]
+\begin{tikzpicture}
+ \path (1,2,3) coordinate (A)
+ (2,3,-1) coordinate (B)
+ (-1,-2,1) coordinate (C)
+ [3d coordinate={(D)=0.25*(1,2,3)x(B)},
+ 3d coordinate={(E)=0.25*(C)x(B)},
+ 3d coordinate={(F)=(A)-(B)},];
+ \path foreach \X in {A,...,E}
+ {(\X) node[fill,inner sep=1pt,
+ label=above:$\X$]{}};
+\end{tikzpicture}
+\end{codeexample}
+
+The actual parsings are done by the function |\pgfmathtdparse| that allows one
+to parse 3d expressions. The supported vector operations are |+| (addition $+$),
+|-| (subtraction $-$), |*| (multiplication of the vector by a scalar), |x|
+(vector product $\times$) and |o| (scalar product).
+
+\begin{command}{\pgfmathtdparse{\marg{x}}}
+ Parses 3d expressions.
+\end{command}
+
+In order to pretty-print the result one may want to use |\pgfmathprintvector|,
+and use the math function |TD| for parsing.
+
+\begin{command}{\pgfmathprintvector\marg{x}}
+ Pretty-prints vectors.
+\end{command}
+
+
+\begin{codeexample}[width=6.5cm]
+\pgfmathparse{TD("0.2*(A)
+-0.3*(B)+0.6*(C)")}%
+$0.2\,\vec A-0.3\,\vec B+0.6\,\vec C
+=(\pgfmathprintvector\pgfmathresult)$
+\end{codeexample}
+
+The alert reader may wonder why this works, i.e.\ how would \tikzname\ ``know''
+what the coordinates $A$, $B$ and $C$ are. It works because the coordinates in
+\tikzname\ are global, so they get remembered from the above example.
+
+\paragraph{Warning.} The expressions that are used in the coordinates will only
+be evaluated when they are retrieved. So, if you use, say, random numbers, you
+will get each time a \emph{different} result.
+
+\begin{codeexample}[width=4cm]
+\begin{tikzpicture}
+ \path[overlay] (rnd,rnd,rnd)
+ coordinate (R);
+ \node at (0,1)
+ {\pgfmathparse{TD("(R)")}%
+ $\vec R=(\pgfmathprintvector\pgfmathresult)$};
+ \node at (0,0)
+ {\pgfmathparse{TD("(R)")}%
+ $\vec R=(\pgfmathprintvector\pgfmathresult)$};
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[width=5.2cm]
+\pgfmathparse{TD("(1,0,0)x(0,1,0)")}%
+$(1,0,0)^T\times(0,1,0)^T=
+(\pgfmathprintvector\pgfmathresult)^T$
+\end{codeexample}
+
+
+\begin{codeexample}[width=5.2cm]
+\pgfmathparse{TD("(A)o(B)")}%
+$\vec A\cdot \vec B=
+\pgfmathprintnumber\pgfmathresult$
+\end{codeexample}
+
+
+Notice that, as of now, the only purpose of brackets |(...)| is to delimit
+vectors. Further, the addition |+| and subtraction |-| have a \emph{higher}
+precedence than vector products |x| and scalar products |o|. That is,
+|(A)+(B)o(C)| gets interpreted as $(\vec A+\vec B)\cdot\vec C$, and
+|(A)+(B)x(C)| as $(\vec A+\vec B)\times\vec C$.
+
+
+\begin{codeexample}[width=5.2cm]
+\pgfmathparse{TD("(A)+(B)o(C)")}%
+$(\vec A+\vec B)\cdot\vec C=
+\pgfmathprintnumber\pgfmathresult$
+\end{codeexample}
+
+\begin{codeexample}[width=5.2cm]
+\pgfmathparse{TD("(A)+(B)x(C)")}%
+$(\vec A+\vec B)\times\vec C=
+(\pgfmathprintvector\pgfmathresult)$
+\end{codeexample}
+
+Moreover, any expression can only have either one |o| or one |x|, or none of
+these. Expressions with more of these can be accidentally right.
+
+\subsection{Orthonormal projections}
+\label{sec:3DOrthonormalProjections}
+
+This library can be used together with the |tikz-3dplot| package. It also has
+its own means to install orthonormal projections. Orthonormal projections emerge
+from subjecting 3-dimensional vectors to orthogonal transformations and
+projecting them to 2 dimensions. They are not to be confused with the
+perspective projections, which are more realistic and supported by the |tpp|
+library. Orthonormal projections may be thought of a limit of perspective
+projections at large distances, where large means that the distance of the
+observer is much larger than the dimensions of the objects that get depicted.
+
+\begin{key}{/tikz/3d/install view}
+ Installs a 3d orthonormal projection.
+\end{key}
+
+The initial projection is such that $x$ is right an $y$ is up, as if we had no
+third direction.
+
+\begin{codeexample}[width=2cm]
+\begin{tikzpicture}[3d/install view]
+ \draw[-stealth] (0,0,0) -- (1,0,0)
+ node[pos=1.2] {$x$};
+ \draw[-stealth] (0,0,0) -- (0,1,0)
+ node[pos=1.2] {$y$};
+ \draw[-stealth] (0,0,0) -- (0,0,1)
+ node[pos=1.2] {$z$};
+\end{tikzpicture}
+\end{codeexample}
+
+The 3d-like picture emerge by rotating the view. The conventions for the
+parametrization of the orthogonal rotations in terms of three rotation angles
+$\phi$, $\psi$ and $\theta$ are
+\[ O(\phi,\psi,\theta)=\left(\begin{array}{ccc}
+ s_{\phi}\,c_{\psi}
+& s_{\psi}
+& -s_{\phi}\,c_{\theta}-c_{\phi}\,s_{\psi}\,s_{\theta} \\
+ c_{\phi}\,c_{\theta}-s_{\phi}\,s_{\psi}\,s_{\theta}
+& c_{\psi}\,s_ {\theta}
+& s_{\phi}\,s_{\theta}-c_{\phi}\,c_{\theta}\,s_{\psi} \\
+ -s_{\phi}\,s_{\psi}\,c_{\theta}-c_{\phi}\,s_{\theta}
+& c_{\psi}\,c_{\theta}
+& c_{\psi}\,c_{\theta}\end{array}\right)\;.
+\]
+Here, $c_\phi:=\cos\phi$, $s_\phi:=\sin\phi$ and so on.
+\begin{key}{/tikz/3d/phi (initially 0)}
+ 3d rotation angle.
+\end{key}
+\begin{key}{/tikz/3d/psi (initially 0)}
+ 3d rotation angle.
+\end{key}
+\begin{key}{/tikz/3d/theta (initially 0)}
+ 3d rotation angle.
+\end{key}
+The rotation angles can be used to define the view. The conventions are chosen
+in such a way that they resemble those of the |tikz-3dplot| package, which gets
+widely used.
+
+\begin{codeexample}[width=2.5cm]
+\begin{tikzpicture}[3d/install view={phi=110,psi=0,theta=70}]
+ \draw[-stealth] (0,0,0) -- (1,0,0)
+ node[pos=1.2] {$x$};
+ \draw[-stealth] (0,0,0) -- (0,1,0)
+ node[pos=1.2] {$y$};
+ \draw[-stealth] (0,0,0) -- (0,0,1)
+ node[pos=1.2] {$z$};
+\end{tikzpicture}
+\end{codeexample}
+
+\begin{codeexample}[width=2.5cm]
+\begin{tikzpicture}[3d/install view={phi=110,psi=0,theta=70}]
+ \draw[-stealth] (0,0,0) -- (1,0,0)
+ node[pos=1.2] {$x$};
+ \draw[-stealth] (0,0,0) -- (0,1,0)
+ node[pos=1.2] {$y$};
+ \draw[-stealth] (0,0,0) -- (0,0,1)
+ node[pos=1.2] {$z$};
+\end{tikzpicture}
+\end{codeexample}
+
+\subsection{Predefined pics}
+
+\begin{key}{/tikz/pics/3d circle through 3 points=\meta{options} (initially empty)}
+ Draws a circle through 3 points in 3 dimensions. If the three
+ coordinates are close to linearly dependent, the circle will not be
+ drawn.
+\end{key}
+\begin{key}{/tikz/3d circle through 3 points/A (initially {(1,0,0)})}
+ First coordinate. Can be either symbolic or explicit. Symbolic
+ coordinates need to be defined via
+ |\path (x,y,z) coordinate (name);|.
+\end{key}
+\begin{key}{/tikz/3d circle through 3 points/B (initially {(0,1,0)})}
+ Second coordinate, like above.
+\end{key}
+\begin{key}{/tikz/3d circle through 3 points/C (initially {(0,0,1)})}
+ Third coordinate, like above.
+\end{key}
+\begin{key}{/tikz/3d circle through 3 points/center name (initially {M})}
+ Name of the center coordinate that will be derived.
+\end{key}
+\begin{key}{/tikz/3d circle through 3 points/auxiliary coordinate prefix (initially {tmp})}
+ In \tikzname the coordinates are global. The code for the circle is more
+ comprehensible if named coordinates are introduced. Their names will begin with
+ this prefix. Changing the prefix will allow users to avoid overwritin
+ existing coordinates.
+\end{key}
+
+\begin{codeexample}[width=2.5cm]
+\begin{tikzpicture}[3d/install view={phi=30,psi=0,theta=70}]
+ \foreach \X in {A,B,C}
+ {\pgfmathsetmacro{\myx}{3*(rnd-1/2)}
+ \pgfmathsetmacro{\myy}{3*(rnd-1/2)}
+ \pgfmathsetmacro{\myz}{3*(rnd-1/2)}
+ \path (\myx,\myy,\myz) coordinate (\X);}
+ \path pic{3d circle through 3 points={%
+ A={(A)},B={(B)},C={(C)}}};
+ \foreach \X in {A,B,C,M}
+ {\fill (\X) circle[radius=1.5pt]
+ node[above]{$\X$};}
+\end{tikzpicture}
+\end{codeexample}
+
+To do:
+\begin{itemize}
+ \item transform to plane given by three non-degenerate coordinates
+ \item transform to plane given by normal and one point
+ \item maybe layering/visibility
+\end{itemize}
+
+\subsection{3D--like decorations}
+
+\begin{key}{/tikz/decorations/3d complete coil}
+ 3d--like coil where the front is thicker than the back.
+\end{key}
+
+\begin{key}{/tikz/decorations/3d coil closed}
+ Indicates that the coil is closed.
+\end{key}
+
+
+\begin{codeexample}[width=8cm]
+\begin{tikzpicture}
+\draw[decoration={3d coil color=red,aspect=0.35, segment length=3.1mm,
+amplitude=3mm,3d complete coil},
+decorate] (0,1) -- (0,6);
+\draw[decoration={3d coil color=blue,3d coil opacity=0.9,aspect=0.5,
+segment length={2*pi*3cm/50}, amplitude=5mm,3d complete coil,
+3d coil closed},
+decorate] (5,3.5) circle[radius=3cm];
+\end{tikzpicture}
+\end{codeexample}
+
+
+\end{document}
+
+
+\tdplotsetmaincoords{70}{110}
+\begin{tikzpicture}
+ \begin{scope}[local bounding box=tests,tdplot_main_coords]
+ % to work with this library, you need to define the cordinate
+ % with \path (<x>,<y>,<z>) coordinate (<name>);
+ \path (0,0,0) coordinate (O)
+ (1,2,3) coordinate (A)
+ (2,3,-1) coordinate (B)
+ (-1,-2,1) coordinate (C)
+ % you can use 3d parse (clumsy)
+ [3d parse={0.25*(A)x(B)}] coordinate(D)
+ % you can use 3d coordinate to define a new coordinate from existing ones
+ [3d coordinate={(E)=0.2*(A)-0.3*(B)+0.6*(C)}]
+ [3d coordinate={(H)=0.2*(A)-0.3*(B)+0.6*(C)}];
+ \draw (A) -- (B) -- (C) -- (D) -- (E) -- cycle;
+ \end{scope}
+ %\RawCoord yields the components
+ \edef\tempD{\RawCoord(D)}
+ \edef\tempE{\RawCoord(E)}
+ \edef\tempH{\RawCoord(H)}
+ \node[below right,align=left] at (tests.south west)
+ {$(D)=\tempD$,\\ $(E)=\tempE$,\\ $(H)=\tempH$};
+\end{tikzpicture}
+
+\noindent% clumsy parser
+$\tdparse{(A)+0.3*(B)>(A)+0.3(B)}=(\pgfmathresult)$
+
+\noindent% parsing inside \pgfmathparse. You need to wrap the argument in "..."
+\pgfmathparse{TD("0.2*(A)-0.3*(B)+0.6*(C)")}%
+$0.2\,\vec A-0.3\,\vec B+0.6\vec C=(\pgfmathresult)$
+
+%one can parse with the same parser vector products
+\noindent\pgfmathparse{TD("0.5*(A)x(B)")}%
+$0.5\,\vec A\times\vec B=(\pgfmathresult)$
+%(note, however, that something like (A)x(B)x(C) does NOT work)
+
+%as well as scalar products
+\noindent\pgfmathparse{TD("(A)+(C)o(B)")}%
+$\left(\begin{array}{@{}c@{}}1\\ 0\\ 0\end{array}\right)$
+%(note, however, that + and - have higher precedence than o)\end{document}
+
+
+\end{document}
+
+\endinput
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-3dtools/3DToolsManual.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/tikz-3dtools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tikz-3dtools/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/tikz-3dtools/README.md 2019-11-15 21:38:02 UTC (rev 52805)
@@ -0,0 +1,23 @@
+# tikz-3dtools – additional tools to create 3d–like pictures
+
+[![Travis Build Status][travis-svg]][travis-link]
+
+*by [tallmarmot](https://github.com/tallmarmot)*
+
+Ti*k*Z has the `3d` and `tpp` libraries which deal with the
+projections of three-dimensional drawings. This library provides some
+means to manipulate the coordinates. It supports linear combinations
+of vectors, vector and scalar products.
+
+The library is currently maintained by the PGF/Ti*k*Z development team
+at https://github.com/pgf-tikz/tikz-3dtools. Please report bugs on
+the issue tracker at https://github.com/pgf-tikz/tikz-3dtools/issues
+or on the mailing list https://tug.org/mailman/listinfo/pgf-tikz.
+
+This library may be distributed and/or modified
+
+1. under the LaTeX Project Public License 1.3c or later and/or
+2. under the GNU General Public License v2.
+
+[travis-svg]: https://travis-ci.com/pgf-tikz/tikz-3dtools.svg?branch=master
+[travis-link]: https://travis-ci.com/pgf-tikz/tikz-3dtools
\ No newline at end of file
Property changes on: trunk/Master/texmf-dist/doc/latex/tikz-3dtools/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/tikz-3dtools/tikzlibrary3dtools.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tikz-3dtools/tikzlibrary3dtools.code.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/tikz-3dtools/tikzlibrary3dtools.code.tex 2019-11-15 21:38:02 UTC (rev 52805)
@@ -0,0 +1,712 @@
+% Copyright 2019 by an anonymous marmot
+%
+% This file may be distributed and/or modified
+%
+% 1. under the LaTeX Project Public License and/or
+% 2. under the GNU Public License.
+%
+% See the file doc/generic/pgf/licenses/LICENSE for more details.
+\ProvidesFileRCS{tikzlibrary3dtools.code.tex}
+\usetikzlibrary{3d,decorations,fpu}% to do: ability to switch on and off
+\usepackage{calculator}% maybe drop
+\makeatletter%
+\def\extractpgfversionaux#1.#2.#3|#4#5#6;{\def#4{#1}\def#5{#2}\def#6{#3}}%
+\def\checkversion{%
+\edef\temp{\noexpand\extractpgfversionaux\pgfversion|\noexpand\myu\noexpand\myv\noexpand\myw;}%
+\temp%
+\pgfmathtruncatemacro{\itest}{ifthenelse(10*\myu+\myv<31,0,1)}%
+\ifnum\itest=0%
+\message{You are using a too old version of pgf (\pgfversion). You need at least
+version 3.1.1 to use the features of this library.}%
+\fi}%
+\checkversion%
+\newcommand{\orthmat}[3]{% the entries of this matrix keep track
+\pgfmathparse{cos(#1)*cos(#2)}% of the current transformation
+\xdef\tikz at td@matAA{\pgfmathresult}%
+\pgfmathparse{cos(#2)*sin(#1)}%
+\xdef\tikz at td@matAB{\pgfmathresult}%
+\pgfmathparse{sin(#2)}%
+\xdef\tikz at td@matAC{\pgfmathresult}%
+\pgfmathparse{-cos(#3)*sin(#1)-cos(#1)*sin(#2)*sin(#3)}%
+\xdef\tikz at td@matBA{\pgfmathresult}%
+\pgfmathparse{cos(#1)*cos(#3)-sin(#1)*sin(#2)*sin (#3)}%
+\xdef\tikz at td@matBB{\pgfmathresult}%
+\pgfmathparse{cos(#2)*sin (#3)}%
+\xdef\tikz at td@matBC{\pgfmathresult}%
+\pgfmathparse{sin(#1)*sin(#3)-cos(#1)*cos(#3)*sin(#2)}%
+\xdef\tikz at td@matCA{\pgfmathresult}%
+\pgfmathparse{-cos(#3)*sin(#1)*sin(#2)-cos(#1)*sin(#3)}%
+\xdef\tikz at td@matCB{\pgfmathresult}%
+\pgfmathparse{cos(#2)*cos(#3)}%
+\xdef\tikz at td@matCC{\pgfmathresult}}%
+\tikzset{3d/.cd,phi/.initial=0,psi/.initial=0,theta/.initial=0,
+install view/.style={/utils/exec=\tikzset{3d/.cd,#1}%
+\orthmat{\pgfkeysvalueof{/tikz/3d/phi}}{%
+\pgfkeysvalueof{/tikz/3d/psi}}{\pgfkeysvalueof{/tikz/3d/theta}},%
+/tikz/x={({\tikz at td@matAA*1cm},{\tikz at td@matBA*1cm})},%
+/tikz/y={({\tikz at td@matAB*1cm},{\tikz at td@matBB*1cm})},%
+/tikz/z={({\tikz at td@matAC*1cm},{\tikz at td@matBC*1cm})}}}%
+\def\pgfmathparse at td@FPU#1{\begingroup%
+\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
+\pgfmathparse{#1}%
+\pgfmathsmuggle\pgfmathresult\endgroup}%
+%
+\newlength\pgf at X% not clear if one should use lengths here at all
+\newlength\pgf at Y%
+\newlength\pgf at Z%
+\newlength\pgf at Xa%
+\newlength\pgf at Ya%
+\newlength\pgf at Za%
+\newlength\pgf at Xb%
+\newlength\pgf at Yb%
+\newlength\pgf at Zb%
+\xdef\tikz at td@type{0}%0=linear combination,1=vector product
+\long\def\RawCoord(#1){\csname tikz at dcl@coord@#1\endcsname}%
+\long\def\ParseCoord(#1){%
+\pgfutil at tempcnta=0%
+\pgfutil at for\pgf at tmp:={#1}\do{\advance\pgfutil at tempcnta by1}%
+\ifnum\the\pgfutil at tempcnta=1
+\edef\pgfutil at tmp{\csname tikz at dcl@coord@#1\endcsname}%
+\else%
+\edef\pgfutil at tmp{(#1)}%
+\fi%
+\pgfmathparse at td@FPU{xcomp3(\pgfutil at tmp)}%
+\pgf at X=\pgfmathresult pt%
+\pgfmathparse at td@FPU{ycomp3(\pgfutil at tmp)}%
+\pgf at Y=\pgfmathresult pt%
+\pgfmathparse at td@FPU{zcomp3(\pgfutil at tmp)}%
+\pgf at Z=\pgfmathresult pt}%
+\pgfmathdeclarefunction{TD}{1}{%
+\begingroup%
+\pgfmathtdparse{#1}%
+\pgfmathsmuggle\pgfmathresult\endgroup%
+}%
+% projections
+\pgfmathdeclarefunction{xcomp3}{3}{% x component of a 3-vector
+\begingroup%
+\pgfmathparse at td@FPU{#1}%
+\pgfmathsmuggle\pgfmathresult\endgroup}
+\pgfmathdeclarefunction{ycomp3}{3}{% y component of a 3-vector
+\begingroup%
+\pgfmathparse at td@FPU{#2}%
+\pgfmathsmuggle\pgfmathresult\endgroup}
+\pgfmathdeclarefunction{zcomp3}{3}{% z component of a 3-vector
+\begingroup%
+\pgfmathparse at td@FPU{#3}%
+\pgfmathsmuggle\pgfmathresult\endgroup}
+\pgfmathdeclarefunction{TDx}{1}{% x component of a 3-vector
+\begingroup%
+\edef\mycoord{\RawCoord(#1)}%
+\pgfmathparse at td@FPU{xcomp3\mycoord}%
+\pgfmathsmuggle\pgfmathresult\endgroup}%
+\pgfmathdeclarefunction{TDy}{1}{% x component of a 3-vector
+\begingroup%
+\edef\mycoord{\RawCoord(#1)}%
+\pgfmathparse at td@FPU{ycomp3\mycoord}%
+\pgfmathsmuggle\pgfmathresult\endgroup}%
+\pgfmathdeclarefunction{TDz}{1}{% x component of a 3-vector
+\begingroup%
+\edef\mycoord{\RawCoord(#1)}%
+\pgfmathparse at td@FPU{zcomp3\mycoord}%
+\pgfmathsmuggle\pgfmathresult\endgroup}%
+\def\scalprod#1=#2.#3;{%
+\edef\coordA{\RawCoord#2}%
+\edef\coordB{\RawCoord#3}%
+\pgfmathsetmacro\pgfutil at tmpa{scalarproduct({\coordA},{\coordB})}%
+\edef#1{\pgfutil at tmpa}}%
+\def\spaux#1#2#3#4#5#6{(#1)*(#4)+(#2)*(#5)+(#3)*(#6)}%
+\pgfmathdeclarefunction{scalarproduct}{2}{% scalar product of two 3-vectors
+\begingroup%
+\pgfmathparse at td@FPU{\spaux#1#2}%
+\pgfmathsmuggle\pgfmathresult\endgroup}
+% vector product
+% vector product auxiliary functions
+\def\vpauxx#1#2#3#4#5#6{(#2)*(#6)-(#3)*(#5)}%
+\def\vpauxy#1#2#3#4#5#6{(#4)*(#3)-(#1)*(#6)}%
+\def\vpauxz#1#2#3#4#5#6{(#1)*(#5)-(#2)*(#4)}%
+% vector product pgf functions
+\pgfmathdeclarefunction{vpx}{2}{% x component of vector product
+\begingroup%
+\pgfmathparse at td@FPU{\vpauxx#1#2}%
+\pgfmathsmuggle\pgfmathresult\endgroup}
+\pgfmathdeclarefunction{vpy}{2}{% y component of vector product
+\begingroup%
+\pgfmathparse at td@FPU{\vpauxy#1#2}%
+\pgfmathsmuggle\pgfmathresult\endgroup}
+\pgfmathdeclarefunction{vpz}{2}{% z component of vector product
+\begingroup%
+\pgfmathparse at td@FPU{\vpauxz#1#2}%
+\pgfmathsmuggle\pgfmathresult\endgroup}
+%
+%
+% the following is very much "inspired" by the calc library
+\long\def\pgfmathtdparse#1{% < and > really are placeholders for a later integration
+\begingroup% into calc, which however requires changes both in
+% tikzlibrarycalc.code.tex and in tikz.code.tex
+%
+% tdparse main computation. It's a series of optional factors in front
+% of coordinates. It is very much copied from the calc library.
+%
+\pgf at Xa=0pt% We accumulate the result in here.
+\pgf at Ya=0pt%
+\pgf at Za=0pt%
+\tikz at td@cc at parse+#1%
+}%
+
+\def\tikz at td@cc at parse{%
+\pgfutil at ifnextchar>{%
+% Ok, we found the end...
+\tikz at td@cc at end%
+}
+{\pgfutil at ifnextchar+{%
+% Ok, we found a coordinate...
+\tikz at td@cc at add%
+}{%
+\pgfutil at ifnextchar-{%
+\tikz at td@cc at sub%
+}{%
+\pgfutil at ifnextchar x{%
+\tikz at td@cc at vecprod%
+}{%
+\pgfutil at ifnextchar o{%
+\tikz at td@cc at scalprod%
+}{% \tikzerror{+ or - expected}%
+\tikz at td@cc at end%
+}%
+}%
+}%
+}%
+}%
+}%
+%
+% The end is reached with > at the moment but this should change
+%
+\def\tikz at td@cc at end{%
+\ifcase\tikz at td@type%
+\pgfmathsetmacro{\pgftemp at x}{\pgf at Xa}%
+\pgfmathsetmacro{\pgftemp at y}{\pgf at Ya}%
+\pgfmathsetmacro{\pgftemp at z}{\pgf at Za}%
+\edef\pgfmathresult{\pgftemp at x,\pgftemp at y,\pgftemp at z}%
+\or%
+\pgfmathsetmacro{\myxa}{\pgf at Xa}%
+\pgfmathsetmacro{\myya}{\pgf at Ya}%
+\pgfmathsetmacro{\myza}{\pgf at Za}%
+\pgfmathsetmacro{\myxb}{\pgf at Xb}%
+\pgfmathsetmacro{\myyb}{\pgf at Yb}%
+\pgfmathsetmacro{\myzb}{\pgf at Zb}%
+\pgfmathsetmacro{\pgftemp at x}{\vpauxx{\myxb}{\myyb}{\myzb}{\myxa}{\myya}{\myza}}%
+\pgfmathsetmacro{\pgftemp at y}{\vpauxy{\myxb}{\myyb}{\myzb}{\myxa}{\myya}{\myza}}%
+\pgfmathsetmacro{\pgftemp at z}{\vpauxz{\myxb}{\myyb}{\myzb}{\myxa}{\myya}{\myza}}%
+%\typeout{P1=(\myxb,\myyb,\myzb),P2=(\myxa,\myya,\myza),P1xP2=(\pgftemp at x,\pgftemp at y,\pgftemp at z)}%
+\edef\pgfmathresult{\pgftemp at x,\pgftemp at y,\pgftemp at z}%
+\or%
+\pgfmathsetmacro{\myxa}{\pgf at Xa}%
+\pgfmathsetmacro{\myya}{\pgf at Ya}%
+\pgfmathsetmacro{\myza}{\pgf at Za}%
+\pgfmathsetmacro{\myxb}{\pgf at Xb}%
+\pgfmathsetmacro{\myyb}{\pgf at Yb}%
+\pgfmathsetmacro{\myzb}{\pgf at Zb}%
+\pgfmathparse at td@FPU{\myxa*\myxb+\myya*\myyb+\myza*\myzb}%
+%\typeout{P1=(\myxb,\myyb,\myzb),P2=(\myxa,\myya,\myza),P1.P2=(\pgmfmathresult)}%
+\fi%
+%\message{result = (\pgftemp at x,\pgftemp at y,\pgftemp at z)=\pgfmathresult^^J}%
+\xdef\tikz at td@type{0}% reset type to linear combination
+\pgfmathsmuggle\pgfmathresult\endgroup}%
+%
+\def\tikz at td@cc at add+{%
+\def\tikz at td@cc at factor{1}%
+\tikz at td@cc at factororcoordinate%
+}%
+\def\tikz at td@cc at sub-{%
+\def\tikz at td@cc at factor{-1}%
+\tikz at td@cc at factororcoordinate%
+}%
+\def\tikz at td@cc at vecprod x{%
+%\message{Ah, a vector product^^J}%
+\xdef\tikz at td@type{1}%
+\pgf at Xb=\pgf at Xa% store current vector in b
+\pgf at Yb=\pgf at Ya%
+\pgf at Zb=\pgf at Za%
+\pgf at Xa=0pt% reset a
+\pgf at Ya=0pt%
+\pgf at Za=0pt%
+\def\tikz at td@cc at factor{1}%
+\tikz at td@cc at factororcoordinate%
+}%
+\def\tikz at td@cc at scalprod o{%
+%\message{Ah, a scalar product^^J}%
+\xdef\tikz at td@type{2}%
+\pgf at Xb=\pgf at Xa% store current vector in b
+\pgf at Yb=\pgf at Ya%
+\pgf at Zb=\pgf at Za%
+\pgf at Xa=0pt% reset a
+\pgf at Ya=0pt%
+\pgf at Za=0pt%
+\def\tikz at td@cc at factor{1}%
+\tikz at td@cc at factororcoordinate%
+}%
+%
+% Check for a factor: If we see a (, its a coordinate...
+%
+\def\tikz at td@cc at factororcoordinate{%
+\pgfutil at ifnextchar({%)
+% Ok, found coordinate
+\tikz at td@cc at coordinate%
+}{%
+\tikz at td@cc at parse@factor%
+}%
+}%
+%
+% ... otherwise it's a factor. It ends at ...*(
+%
+\def\tikz at td@cc at parse@factor#1*({%
+\pgfmathparse at td@FPU{#1*\tikz at td@cc at factor}%
+\let\tikz at td@cc at factor=\pgfmathresult%
+\tikz at td@cc at coordinate(%)
+}%
+\def\tikz at td@cc at coordinate(#1){%
+\ParseCoord(#1)%
+\advance\pgf at Xa by\tikz at td@cc at factor\pgf at X
+\advance\pgf at Ya by\tikz at td@cc at factor\pgf at Y
+\advance\pgf at Za by\tikz at td@cc at factor\pgf at Z
+\tikz at td@cc at parse%
+}%
+\tikzset{declare function={torusx(\u,\v,\R,\r)=cos(\u)*(\R + \r*cos(\v));
+torusy(\u,\v,\R,\r)=(\R + \r*cos(\v))*sin(\u);
+torusz(\u,\v,\R,\r)=\r*sin(\v);
+vcrit1(\u,\th)=atan(tan(\th)*sin(\u));% first critical v value
+vcrit2(\u,\th)=180+atan(tan(\th)*sin(\u));% second critical v value
+vtest(\u,\v,\az,\el)=sin(-vcrit1(\u-\az,\el)+\v);
+disc(\th,\R,\r)=((pow(\r,2)-pow(\R,2))*pow(cot(\th),2)+%
+pow(\r,2)*(2+pow(tan(\th),2)))/pow(\R,2);% discriminant
+umax(\th,\R,\r)=ifthenelse(disc(\th,\R,\r)>0,asin(sqrt(abs(disc(\th,\R,\r)))),0);
+}}%
+%
+\tikzset{3d parse/.style={/utils/exec=\pgfmathtdparse{#1},%
+insert path={(\pgfmathresult)}},3d coordinate/.style args={#1=#2}{%
+/utils/exec=\pgfmathtdparse{#2},%
+insert path={(\pgfmathresult) coordinate #1}}}%
+\def\pgfmathprintvector#1{%
+\pgfutil at tempcnta=0%
+\pgfutil at for\pgf at tmp:={#1}\do{\advance\pgfutil at tempcnta by1}%
+\pgfutil at tempcntb=1%
+\pgfutil at for\pgf at tmp:={#1}\do{\advance\pgfutil at tempcntb by1%
+\ifnum\the\pgfutil at tempcntb<\the\pgfutil at tempcnta
+\pgfmathprintnumber\pgf at tmp,%
+\else
+\pgfmathprintnumber\pgf at tmp
+\fi}%
+}%
+%%
+%% predefined pics
+% based on https://en.wikipedia.org/wiki/Circumscribed_circle
+\tikzset{pics/3d circle through 3 points/.style={code={%
+ \tikzset{3d/circle through 3 points/.cd,#1}%
+ \edef\temp{\noexpand\path[overlay,
+ 3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}b)=\pgfkeysvalueof{/tikz/3d/circle through 3 points/A}-\pgfkeysvalueof{/tikz/3d/circle through 3 points/C}},
+ 3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)=\pgfkeysvalueof{/tikz/3d/circle through 3 points/B}-\pgfkeysvalueof{/tikz/3d/circle through 3 points/C}},
+ 3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}c)=\pgfkeysvalueof{/tikz/3d/circle through 3 points/A}-\pgfkeysvalueof{/tikz/3d/circle through 3 points/B}},
+ 3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)=(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)x(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}b)}];}%
+ \temp
+ \pgfmathsetmacro{\lengthn}{sqrt(TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)"))}
+ \ifdim\lengthn pt<0.02pt
+ \message{The points are (almost) on a line. Circle cannot be determined.}
+ \else
+ \pgfmathsetmacro{\tmpradius}{sqrt(TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)"))*%
+ sqrt(TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}b)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}b)"))*sqrt(TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}c)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}c)"))/%
+ (2*\lengthn)}
+ \pgfmathsetmacro{\coeffa}{-1*TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}b)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}b)")/(2*TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)"))}
+ \pgfmathsetmacro{\coeffb}{TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)")/(2*TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)"))}
+ \edef\temp{%
+ \noexpand\path[overlay,3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}u)=\coeffa*(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)x(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)},
+ 3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}v)=\coeffb*(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}b)x(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)}];
+ \noexpand\path[3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/center name})=\pgfkeysvalueof{/tikz/3d/circle through 3 points/C}+(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}u)+(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}v)}];
+ }%
+ \temp
+ \pgfmathsetmacro{\normalizationa}{1/sqrt(TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)"))}
+ \pgfmathsetmacro{\normalizationn}{1/sqrt(TD("(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)o(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)"))}
+ \edef\temp{%
+ \noexpand\path[overlay,3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)=\normalizationa*(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)},
+ 3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)=\normalizationn*(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)},
+ 3d coordinate={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}c)=(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)x(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}n)}];
+ }%
+ \temp
+ \edef\temp{%
+ \noexpand\begin{scope}[plane x={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}a)},plane y={(\pgfkeysvalueof{/tikz/3d/circle through 3 points/auxiliary coordinate prefix}c)},canvas is plane]
+ \noexpand\draw[pic actions] (\pgfkeysvalueof{/tikz/3d/circle through 3 points/center name}) circle[radius=\tmpradius];
+ \noexpand\end{scope}}%
+ \temp
+ \fi
+}},3d/circle through 3 points/.cd,A/.initial={(1,0,0)},B/.initial={(0,1,0)},
+C/.initial={(0,0,1)},
+auxiliary coordinate prefix/.initial=tmp,center name/.initial=M}%
+%%
+%% decorations
+%%
+\newif\ifcoil at closed%
+\pgfkeys{%%
+/pgf/decoration/.cd,%
+3d coil color/.store in=\TDCoilColor, %
+3d coil color/.initial=black,%
+3d coil color=black,%
+3d coil width/.store in=\TDCoilWidth, %
+3d coil width/.initial=0.4pt,%
+3d coil width=0.4pt,%
+3d coil dist/.store in=\TDCoilDist, %
+3d coil dist/.initial=0.6pt,%
+3d coil dist=0.6pt,%
+3d coil opacity/.store in=\TDCoilOpacity, %
+3d coil opacity/.initial=1,%
+3d coil opacity=1,%
+3d coil closed/.code=\coil at closedtrue%
+}%
+% https://tex.stackexchange.com/a/219088/121799%
+\tikzset{get stroke color/.code={%%
+ \expandafter\global% Jump over, now we have \global%
+ \expandafter\let% Jump over now we have \global\let%
+ \expandafter\pgfsavedstrokecolor% Jump we have \global\let\pgf...%
+ \csname\string\color at pgfstrokecolor\endcsname% Finally expand this and put it at the end %
+ }, % \global\let\pgf...{} in expanded form %
+ restore stroke color/.code={\pgf at setstrokecolor#1},%
+}%
+\def\pgfpoint at onthreedcoil#1#2#3{%%
+ \pgf at x=#1\pgfdecorationsegmentamplitude%%
+ \pgf at x=\pgfdecorationsegmentaspect\pgf at x%%
+ \pgf at y=#2\pgfdecorationsegmentamplitude%%
+ \pgf at xa=0.083333333333\pgfdecorationsegmentlength%%
+ \advance\pgf at x by#3\pgf at xa%%
+ \advance\pgf at x by-\generaloffset pt%%
+}%
+% coil decoration%
+%%
+% Parameters: \pgfdecorationsegmentamplitude, \pgfdecorationsegmentlength,%
+\pgfdeclaredecoration{3d complete coil}{initial}%
+{ %
+ \state{initial}[width=0.5*\pgfdecorationsegmentlength,%
+ next state=coil, persistent precomputation={% from https://tex.stackexchange.com/a/25689/121799%
+ \pgfmathsetmacro\matchinglength{\pgfdecoratedinputsegmentlength / int(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)}%
+ \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}%
+ \tikzset{get stroke color}%
+ \pgfmathsetmacro{\generaloffset}{\pgfdecorationsegmentlength}%
+ \pgfmathsetmacro{\initialoffset}{1.5*\pgfdecorationsegmentlength}%
+ \pgfmathsetmacro{\auxoffset}{2.5*\pgfdecorationsegmentlength}%
+ }] { %
+ % line in the back%
+ %%
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \pgfsetfillcolor{\TDCoilColor}%
+ \pgfsetstrokeopacity{\TDCoilOpacity}%
+ \pgfsetlinewidth{\TDCoilWidth} %
+ \ifcoil at closed%
+ \begingroup%
+ \def\generaloffset{\auxoffset}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{1.555}{ 1 }{16}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0.555}{17}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0 }{18}}%
+ \pgfcoordinate{TD at coilast}{\pgfpoint at onthreedcoil{2 }{ 0 }{18}}%
+ \pgfcoordinate{TD at coilfirst}{\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ \pgfusepath{stroke} %
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \endgroup%
+ \fi%
+ \begingroup %%
+ \def\generaloffset{\initialoffset}%
+ \ifcoil at closed%
+ \pgfpathmoveto{\pgfpointanchor{TD at coilast}{center}}%
+ \else%
+ \pgfpathmoveto{\pgfpointorigin}%
+ \fi%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{2 }{-0.555}{7}}%
+ {\pgfpoint at onthreedcoil{1.555}{-1 }{8}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke} %
+ %%
+ % white background for front thick part%
+ %%
+ \pgfsetstrokeopacity{1}%
+ \pgfsetstrokecolor{white}%
+ \pgfsetfillcolor{white}%
+ \pgfsetlinewidth{1.5*\TDCoilWidth+1.5*\TDCoilDist}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ % draw forward%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ % draw the curve back%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ % %
+ % draw the thick foreground path%
+ %%
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \pgfsetfillcolor{\TDCoilColor}%
+ \pgfsetstrokeopacity{\TDCoilOpacity}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{3}}%
+ \pgfsetlinewidth{\TDCoilWidth} %
+ % forward shifted +%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ % draw the curve back shfted -%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{1.555}{ 1 }{16}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0.555}{17}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0 }{18}}%
+ \pgfcoordinate{TD at coilast}{\pgfpoint at onthreedcoil{2 }{ 0 }{18}} %
+ \pgfusepath{stroke} %
+ \endgroup%
+ }%
+ \state{coil}[switch if less than=%%
+ 1.9*\pgfdecorationsegmentlength to last,%
+ width=+\pgfdecorationsegmentlength]%
+ { % line in the back%
+ %%
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \pgfsetfillcolor{\TDCoilColor}%
+ \pgfsetstrokeopacity{\TDCoilOpacity}%
+ \pgfpathmoveto{\pgfpointanchor{TD at coilast}{center}}%
+ \pgfsetlinewidth{\TDCoilWidth} %
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{2 }{-0.555}{7}}%
+ {\pgfpoint at onthreedcoil{1.555}{-1 }{8}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke} %
+ %%
+ % white background for front thick part%
+ %%
+ \pgfsetstrokeopacity{1}%
+ \pgfsetstrokecolor{white}%
+ \pgfsetfillcolor{white}%
+ \pgfsetlinewidth{1.5*\TDCoilWidth+1.5*\TDCoilDist}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{3}}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ % draw forward%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ % draw the curve back%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ % %
+ % draw the thick foreground path%
+ %%
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \pgfsetfillcolor{\TDCoilColor}%
+ \pgfsetstrokeopacity{\TDCoilOpacity}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{3}}%
+ \pgfsetlinewidth{\TDCoilWidth} %
+ % forward shifted +%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ % draw the curve back shfted -%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{1.555}{ 1 }{16}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0.555}{17}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0 }{18}}%
+ \pgfusepath{stroke} %
+ \pgfcoordinate{TD at coilast}{\pgfpoint at onthreedcoil{2 }{ 0 }{18}} %
+ }%
+ \state{last}[next state=final]%
+ { % line in the back%
+ %%
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \pgfsetfillcolor{\TDCoilColor}%
+ \pgfsetstrokeopacity{\TDCoilOpacity}%
+ \pgfpathmoveto{\pgfpointanchor{TD at coilast}{center}}%
+ \pgfsetlinewidth{\TDCoilWidth} %
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{2 }{-0.555}{7}}%
+ {\pgfpoint at onthreedcoil{1.555}{-1 }{8}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke} %
+ % %
+ % draw the thick foreground path%
+ %%
+ \ifcoil at closed %\pgfpointanchor{TD at coilfirst}{center}%
+ %%
+ % white background for front thick part%
+ %%
+ \pgfsetstrokeopacity{1}%
+ \pgfsetstrokecolor{white}%
+ \pgfsetfillcolor{white}%
+ \pgfsetlinewidth{1.5*\TDCoilWidth+1.5*\TDCoilDist}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{3}}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ % draw forward%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpointanchor{TD at coilfirst}{center}}%
+ % draw the curve back%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \pgfsetfillcolor{\TDCoilColor}%
+ \pgfsetstrokeopacity{\TDCoilOpacity}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{3}}%
+ \pgfsetlinewidth{\TDCoilWidth} %
+ % forward shifted +%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpointanchor{TD at coilfirst}{center}}%
+ % draw the curve back shifted %
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ \else%
+ %%
+ % white background for front thick part%
+ %%
+ \pgfsetstrokeopacity{1}%
+ \pgfsetstrokecolor{white}%
+ \pgfsetfillcolor{white}%
+ \pgfsetlinewidth{1.5*\TDCoilWidth+1.5*\TDCoilDist}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{3}}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ % draw forward%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ % draw the curve back%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ \pgfsetstrokecolor{\TDCoilColor}%
+ \pgfsetfillcolor{\TDCoilColor}%
+ \pgfsetstrokeopacity{\TDCoilOpacity}%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{3}}%
+ \pgfsetlinewidth{\TDCoilWidth} %
+ % forward shifted +%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{11.25}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{12.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{13.25}}%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14.25}}%
+ {\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ % draw the curve back shifted %
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0.445}{ 1 }{14}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0.555}{12.75}}%
+ {\pgfpoint at onthreedcoil{0 }{ 0 }{11.5}}%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{0 }{-0.555}{10.75}}%
+ {\pgfpoint at onthreedcoil{0.445}{-1 }{10}}%
+ {\pgfpoint at onthreedcoil{1 }{-1 }{9}}%
+ \pgfusepath{stroke,fill} %
+ \fi%
+ \pgfpathmoveto{\pgfpoint at onthreedcoil{1 }{ 1 }{15}}%
+ \ifcoil at closed %TD at coilfirst%
+ \else%
+ \pgfpathcurveto%
+ {\pgfpoint at onthreedcoil{1.555}{ 1 }{16}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0.555}{17}}%
+ {\pgfpoint at onthreedcoil{2 }{ 0 }{18}}%
+ \fi%
+ \pgfusepath{stroke} %
+ %\pgfcoordinate{TD at coilast}{\pgfpoint at onthreedcoil{2 }{ 0 }{18}} %
+ }%
+ \state{final}%
+ {%
+ \pgfpathmoveto{\pgfpointdecoratedpathlast}%
+ \tikzset{restore stroke color/.expand once=\pgfsavedstrokecolor}%
+ }%
+}%
+\makeatother
+\endinput
Property changes on: trunk/Master/texmf-dist/tex/latex/tikz-3dtools/tikzlibrary3dtools.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2019-11-15 21:37:15 UTC (rev 52804)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2019-11-15 21:38:02 UTC (rev 52805)
@@ -684,7 +684,7 @@
thinsp thmbox thmtools threadcol threeddice threeparttable threeparttablex
thuaslogos thucoursework thumb thumbpdf thumbs thumby thuthesis
ticket ticollege
- tikz-bayesnet tikz-cd tikz-3dplot tikz-dependency tikz-dimline
+ tikz-bayesnet tikz-cd tikz-3dplot tikz-3dtools tikz-dependency tikz-dimline
tikz-feynhand tikz-feynman tikz-imagelabels tikz-inet
tikz-kalender tikz-karnaugh tikz-ladder tikz-layers
tikz-nef tikz-network tikz-opm tikz-optics tikz-palattice tikz-qtree
Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2019-11-15 21:37:15 UTC (rev 52804)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc 2019-11-15 21:38:02 UTC (rev 52805)
@@ -143,6 +143,7 @@
depend ticollege
depend tipfr
depend tikz-3dplot
+depend tikz-3dtools
depend tikz-bayesnet
depend tikz-cd
depend tikz-dependency
Added: trunk/Master/tlpkg/tlpsrc/tikz-3dtools.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list