summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-3dplot
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikz-3dplot')
-rw-r--r--Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty29
1 files changed, 20 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty b/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty
index a4849d4b2e7..ab642ab963b 100644
--- a/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty
+++ b/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty
@@ -89,10 +89,15 @@
%#5: false condition result
\newcommand{\tdplotcheckdiff}[5]{%
%
- \pgfmathsubtract{#2}{#1}
- \pgfmathparse{ abs(#2 - #1)}
- \pgfmathparse{ abs(#2 - #1)<#3}
- \ifthenelse{\equal{\pgfmathresult}{1.0}}{#4}{#5}
+ %\pgfmathsubtract{#2}{#1}
+ %\pgfmathparse{ abs(#2 - #1)}
+
+ %\typeout{ #2, #1, \pgfmathresult, #3 }
+
+ \pgfmathparse{ abs(#2 - #1)<#3 }
+
+ %\typeout{ \pgfmathresult }
+ \ifthenelse{\equal{\pgfmathresult}{1}}{#4}{#5}
}
%\tdplotsetdisplay{\theta_d}{\phi_d}
@@ -426,7 +431,6 @@
%#5: end angle
%#6: label options
%#7: label
-%#8: arc arrowhead style
% \tdplotdrawarc{(O)}{0.2}{0}{\phivec}{anchor=north}{$\phi$}
\newcommand{\tdplotdrawarc}[7][tdplot_main_coords]{%
\pgfmathsetmacro{\tdplottemp}{#5 + #4}
@@ -544,7 +548,8 @@
\pgfmathsetmacro{\viewphistep}{\leftright * \origviewphistep}
\pgfmathsetmacro{\viewphiinc}{\viewphistart + \viewphistep}
\pgfmathsetmacro{\viewphiend}{\viewphistart + \leftright * 90 - \viewphistep}
-
+
+ %sweep over phi
\foreach \curphi in{\viewphistart,\viewphiinc,...,\viewphiend}
{
%draw upper and lower parts individually, starting at the point opposite display angle
@@ -560,16 +565,18 @@
\fi
\pgfmathsetmacro{\viewthetainc}{\viewthetastart + \viewthetastep}
- %perform the rendering
+ %perform the rendering of each slice of phi over a range of theta angles
\tdplotdosurfaceplot{#4}{#7}{#8}{#5}{#6}{#1}
}
}
}
+
+ %now that the back half is done, draw the z axis
\begin{scope}[opacity=1]
#9 %draw z axis content
\end{scope}
- %draw front part of shape, doing left and right sides individually
+ %next, draw front part of shape, doing left and right sides individually. This is essentially the same process as before
\pgfmathsetmacro{\tdplotsuperfudge}{\originaltheta < 90}
\foreach \leftright in {1,-1}
{
@@ -577,7 +584,8 @@
\pgfmathsetmacro{\viewphistart}{\originalphi + \leftright * 90}
\pgfmathsetmacro{\viewphiinc}{\viewphistart + \viewphistep}
\pgfmathsetmacro{\viewphiend}{\viewphistart + \leftright * 90 - \viewphistep}
-
+
+ %sweep over phi
\foreach \curphi in{\viewphistart,\viewphiinc,...,\viewphiend}
{
%draw upper and lower parts individually, starting at the either the north or south pole
@@ -624,6 +632,9 @@
\pgfmathsetmacro{\nextphi}{\curphi + \tdplotsuperfudge*\viewphistep}
\begin{scope}[opacity=1]
+
+ %\typeout{ ----------------------------------- }
+
%check if the current phi angle is in position to draw the x axis
\tdplotcheckdiff{\nextphi}{360}{\origviewphistep}{#2}{}
\tdplotcheckdiff{\nextphi}{0}{\origviewphistep}{#2}{}