summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-3dplot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-28 23:27:35 +0000
committerKarl Berry <karl@freefriends.org>2011-02-28 23:27:35 +0000
commitda776f4f7bb7e1e8867f53c9db6d6be0d713dcea (patch)
tree311a5231900f594c7da4b75239102e4095852ffe /Master/texmf-dist/tex/latex/tikz-3dplot
parenta0b9fe01b11de01686c8e02891c57fff5f9a96f1 (diff)
tikz-3dplot (28feb11)
git-svn-id: svn://tug.org/texlive/trunk@21549 c570f23f-e606-0410-a88d-b1316a301751
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}{}