diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty | 38 |
1 files changed, 25 insertions, 13 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 357028b73f0..f06ed0091d1 100644 --- a/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty +++ b/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty @@ -470,11 +470,13 @@ %DEBUG: show the cross product %\draw[->,blue] (\tdplotvertexx,\tdplotvertexy,\tdplotvertexz) - % -- ++(\tdplotresx,\tdplotresy,\tdplotresz); + -- ++(\tdplotresx,\tdplotresy,\tdplotresz); %get angles for this vector \tdplotgetpolarcoords{\tdplotresx}{\tdplotresy}{\tdplotresz} + \typeout{angles for cross product: phi: \tdplotresphi theta: \tdplotrestheta} + %place the rotated coordinate system so that the z' axis points along this vector \tdplotsetrotatedcoords{\tdplotresphi}{\tdplotrestheta}{0} \coordinate (Vertex) at (\tdplotvertexx,\tdplotvertexy,\tdplotvertexz); @@ -490,17 +492,21 @@ \tdplotgetpolarcoords{\tdplotresx}{\tdplotresy}{\tdplotresz} \pgfmathsetmacro{\tdplotstartphi}{\tdplotresphi} + %calculate the end angle of the arc \tdplottransformmainrot{\bx}{\by}{\bz} \tdplotgetpolarcoords{\tdplotresx}{\tdplotresy}{\tdplotresz} %draw the arc \pgfmathparse{\tdplotstartphi < \tdplotresphi} - \ifthenelse{\equal{\pgfmathresult}{1.0}}% + \ifthenelse{\equal{\pgfmathresult}{1}}% {}% { \pgfmathsetmacro{\tdplotstartphi}{\tdplotstartphi - 360} } + + %\typeout{startphi: \tdplotstartphi} + %\typeout{endphi: \tdplotresphi} \draw[tdplot_rotated_coords,#1] (0,0,0) + (\tdplotstartphi:#2) arc (\tdplotstartphi:\tdplotresphi:#2); @@ -663,7 +669,7 @@ \pgfmathsetmacro{\tdplotphi}{mod(\curphi,360)} \pgfmathparse{\tdplotphi < 0} - \ifthenelse{\equal{\pgfmathresult}{1.0}}{ + \ifthenelse{\equal{\pgfmathresult}{1}}{ \pgfmathsetmacro{\tdplotphi}{\tdplotphi + 360} }{}% @@ -690,7 +696,7 @@ \pgfmathsetmacro{\tdplotphi}{\tdplotphi + \viewphistep} \pgfmathparse{\tdplotphi < 0} - \ifthenelse{\equal{\pgfmathresult}{1.0}}{ + \ifthenelse{\equal{\pgfmathresult}{1}}{ \pgfmathsetmacro{\tdplotphi}{\tdplotphi + 360} }{}% @@ -819,7 +825,7 @@ % %check for angles larger than 90 \pgfmathparse{\vzcalc < 0} - \ifthenelse{\equal{\pgfmathresult}{1.0}}% + \ifthenelse{\equal{\pgfmathresult}{1}}% {% \pgfmathsetmacro{\tdplotrestheta}{180 - \tdplotrestheta} } @@ -830,18 +836,20 @@ {% %check the sign of vy, and set angle appropriately \pgfmathparse{\vycalc < 0} - \ifthenelse{\equal{\pgfmathresult}{1.0}}% + \ifthenelse{\equal{\pgfmathresult}{1}}% {% \pgfmathsetmacro{\tdplotresphi}{270} } {% - \pgfmathparse{\vycalc == 0} - \ifthenelse{\equal{\pgfmathresult}{1.0}}% + \pgfmathparse{\vycalc > 0} + \ifthenelse{\equal{\pgfmathresult}{1}}% {% - \pgfmathsetmacro{\tdplotresphi}{0} + %\typeout{\vycalc} + \pgfmathsetmacro{\tdplotresphi}{90} } {% - \pgfmathsetmacro{\tdplotresphi}{90} + %\typeout{OVER HERE!!!!} + \pgfmathsetmacro{\tdplotresphi}{0} } } } @@ -851,16 +859,20 @@ % %check if vx is less than zero, to properly identify the quadrant \pgfmathparse{\vxcalc < 0} - \ifthenelse{\equal{\pgfmathresult}{1.0}}% + %\typeout{x: \vxcalc\ y: \vycalc\ Raw phi: \tdplotresphi\ math result: \pgfmathresult} + \ifthenelse{\equal{\pgfmathresult}{1}}% {% + %\typeout{HERE!} %increase by half a rotation if necessary \pgfmathsetmacro{\tdplotresphi}{\tdplotresphi+180} } - {} + { + %\typeout{SPOON!} + } %ensure the angle lies between 0 and 360 degrees \pgfmathparse{\tdplotresphi < 0} - \ifthenelse{\equal{\pgfmathresult}{1.0}}% + \ifthenelse{\equal{\pgfmathresult}{1}}% {% \pgfmathsetmacro{\tdplotresphi}{\tdplotresphi+360} } |