summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-3dplot
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-18 00:30:22 +0000
committerKarl Berry <karl@freefriends.org>2010-03-18 00:30:22 +0000
commit32abe931086a5d60249d6b2d2140a3848c4b17c9 (patch)
tree16999f6556f272c43ef00a404db0d8269efcedf5 /Master/texmf-dist/tex/latex/tikz-3dplot
parent01a369732eedeeff2314f6238c903304c36f6ca8 (diff)
tikz-3dplot update (17mar10)
git-svn-id: svn://tug.org/texlive/trunk@17481 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.sty27
1 files changed, 25 insertions, 2 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 4873efb424d..6b92c48a855 100644
--- a/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty
+++ b/Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty
@@ -107,6 +107,17 @@
\pgfmathsetmacro{\tdplotmaintheta}{#1}
\pgfmathsetmacro{\tdplotmainphi}{#2}
%
+
+\tdplotcalctransformmainscreen
+
+%now here is where the output is performed
+\tikzset{tdplot_main_coords/.style={x={(\raarot cm,\rbarot cm)},y={(\rabrot cm, \rbbrot cm)},z={(\racrot cm, \rbcrot cm)}}}%
+}
+
+
+%This performs the calculation to define the main coordinate frame orientation style, and is also used to transform a coordinate from the main coordinate frame the the screen coordinate frame
+\newcommand{\tdplotcalctransformmainscreen}{%
+
%TODO: choose less obvious macro names? or look into scoping?
\tdplotsinandcos{\sintheta}{\costheta}{\tdplotmaintheta}%
\tdplotsinandcos{\sinphi}{\cosphi}{\tdplotmainphi}%
@@ -129,10 +140,13 @@
\pgfmathsetmacro{\rcbrot}{-\stcp}%
\pgfmathsetmacro{\rccrot}{\costheta}%
%
-%now here is where the output is performed
-\tikzset{tdplot_main_coords/.style={x={(\raarot cm,\rbarot cm)},y={(\rabrot cm, \rbbrot cm)},z={(\racrot cm, \rbcrot cm)}}}%
+
+
}
+
+
+
%determines the rotation matrix for transformation from the rotation coordinate frame to the main coordinate frame. This also defines the rotation to produce the rotated coordinate frame.
\newcommand{\tdplotcalctransformrotmain}{%
%perform some trig for the Euler transformation
@@ -243,6 +257,15 @@
}
+%transforms a coordinate from the main coordinate frame to the rotated coordinate frame
+\newcommand{\tdplottransformmainscreen}[3]{%
+ \tdplotcalctransformmainscreen
+
+ \pgfmathsetmacro{\tdplotresx}{\raarot * #1 + \rabrot * #2 + \racrot * #3}
+ \pgfmathsetmacro{\tdplotresy}{\rbarot * #1 + \rbbrot * #2 + \rbcrot * #3}
+}
+
+
%\tdplotsetrotatedcoords{\alpha}{\beta}{\gamma}
%generates the coordinate transformation for the rotated coordinate system within the display coordinate system. This should be called only after the display coordinate system has been defined. If the display coordinate system changes, this will have to be updated.