summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-3dplot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-01-12 23:17:13 +0000
committerKarl Berry <karl@freefriends.org>2012-01-12 23:17:13 +0000
commit72bc6c7e927ea35a59459a05923355525de579e9 (patch)
treecec36946510c8a6f986258bff8f24d6ea6d8e907 /Master/texmf-dist/tex/latex/tikz-3dplot
parent302c07209d0fb0e21be8f0c1a02067ac1c9d180a (diff)
tikz-3dplot 2012-01-11 (11jan12)
git-svn-id: svn://tug.org/texlive/trunk@25087 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.sty38
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}
}