summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdfbin448058 -> 453467 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.tex88
-rw-r--r--Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation_figures.tex2
-rw-r--r--Master/texmf-dist/tex/latex/tikz-3dplot/tikz-3dplot.sty27
4 files changed, 114 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdf b/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdf
index 67ed20860be..09bd2a4ae96 100644
--- a/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdf
+++ b/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.tex b/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.tex
index 99b10cfd89e..0e01284c0c5 100644
--- a/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.tex
+++ b/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.tex
@@ -39,10 +39,19 @@
\usepackage{tikz-3dplot} %for tikz-3dplot functionality
\usepackage{amsmath} %for align equation environment
\usepackage{url}
-\usepackage{hyperref}
\pgfrealjobname{tikz-3dplot_documentation}
+\usepackage[pdftex]{hyperref}
+\hypersetup{pdftitle={The tikz-3dplot Package}}
+\hypersetup{pdfauthor={Jeff Hein}}
+\hypersetup{pdfsubject={LaTeX}}
+\hypersetup{pdfcreator={Jeff Hein}}
+\hypersetup{colorlinks=true}
+\hypersetup{citecolor=darkgreen}
+
+
+
\input{tikz-3dplot_documentation_figures.tex}
@@ -130,6 +139,7 @@
\item[2010-01-17] Changed package name from \texttt{3dplot} to \texttt{\tdplot}, and updated document accordingly.
\item[2010-01-20] Added the following commands: \verb|\tdplotgetpolarcoords|, \verb|\tdplotcrossprod|, \verb|\tdplotcalctransformrotmain|, \verb|\tdplotcalctransformmainrot|, \verb|\tdplottransformrotmain|, \verb|\tdplottransformmainrot|, and \verb|\tdplotdrawpolytopearc|.
\item[2010-01-24] Added the ability to hue 3d polar plots based on radius using the \verb|\tdplotr| macro.
+ \item[2010-03-16] Added the \verb|\tdplotcalctransformmainscreen| and \verb|\tdplottransformmainscreen| commands.
\end{description}
\vfill
@@ -852,6 +862,13 @@ This section lists the various commands provided by the \tdplot\ package. Examp
\item[Description:] Calculates the rotation matrix used to define the rotated coordinate frame, as well as transform a coordinate from the rotated coordinate frame to the main coordinate frame. The matrix elements are stored in the macros \verb|\raaeul| through \verb|\rcceul|. This transformation is used in the \verb|\tdplotsetrotatedcoords| command, and is accessed using \verb|\tdplottransformrotmain|.
\end{description}
+\subsection{\texttt{tdplotcalctransformmainscreen}}
+
+\begin{description}
+ \item[Description:] Calculates the rotation matrix used to define the main coordinate frame, as well as transform a coordinate from the main coordinate frame to the screen coordinate frame. The matrix elements are stored in the macros \verb|\raarot| through \verb|\rccrot|. This transformation is used in the \verb|\tdplotsetmaincoords| command, and is accessed using \verb|\tdplottransformmainscreen|.
+\end{description}
+
+
\section{Point Calculation Commands}
\subsection{\texttt{tdplotsetcoord}}
@@ -1110,6 +1127,75 @@ This section lists the various commands provided by the \tdplot\ package. Examp
\end{description}
+\subsection{\texttt{tdplottransformmainscreen}}
+
+\begin{description}
+ \item[Description:] Transforms a coordinate from the main coordinate frame to the screen coordinate frame. This command cannot use a \tikzname\ coordinate. The results are stored in the \verb|\tdplotresx| and \verb|\tdplotresy| macros.
+ \item[Syntax:] \verb|\tdplottransformmainscreen{x}{y}{z}|
+ \item[Parameters:]~
+ \begin{description}
+ \item[x] The x-component of the coordinate in the main coordinate frame.
+ \item[y] The y-component of the coordinate in the main coordinate frame.
+ \item[z] The z-component of the coordinate in the main coordinate frame.
+ \end{description}
+ \item[Output:] The following macros are assigned:
+ \begin{description}
+ \item[\texttt{tdplotresx}] The transformed coordinate x component in the screen coordinate frame.
+ \item[\texttt{tdplotresy}] The transformed coordinate y component in the screen coordinate frame.
+ \end{description}
+ \item[Example:] ~
+\begin{shaded}
+\begin{verbatim}
+\tdplotsetmaincoords{50}{140}
+\begin{tikzpicture}[scale=2,tdplot_main_coords]
+
+ \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
+ \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
+ \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
+
+ \pgfmathsetmacro{\ax}{2}
+ \pgfmathsetmacro{\ay}{3}
+ \pgfmathsetmacro{\az}{1}
+
+ \tdplottransformmainscreen{\ax}{\ay}{\az}
+
+ \draw[tdplot_screen_coords,->,blue!50] (0,0)
+ -- (\tdplotresx,\tdplotresy);
+
+ \node[tdplot_main_coords,anchor=south]
+ at (\ax,\ay,\az){Main coords: (\ax, \ay, \az)};
+ \node[tdplot_screen_coords,anchor=north]
+ at (\tdplotresx,\tdplotresy)
+ {Screen coords: (\tdplotresx, \tdplotresy)};
+
+\end{tikzpicture}
+\end{verbatim}
+\tdplotsetmaincoords{50}{140}
+\begin{tikzpicture}[scale=2,tdplot_main_coords]
+
+ \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
+ \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
+ \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
+
+ \pgfmathsetmacro{\ax}{2}
+ \pgfmathsetmacro{\ay}{3}
+ \pgfmathsetmacro{\az}{1}
+
+ \tdplottransformmainscreen{\ax}{\ay}{\az}
+
+ \draw[tdplot_screen_coords,->,blue!50] (0,0)
+ -- (\tdplotresx,\tdplotresy);
+
+ \node[tdplot_main_coords,anchor=south]
+ at (\ax,\ay,\az){Main coords: (\ax, \ay, \az)};
+ \node[tdplot_screen_coords,anchor=north]
+ at (\tdplotresx,\tdplotresy)
+ {Screen coords: (\tdplotresx, \tdplotresy)};
+
+\end{tikzpicture}
+\end{shaded}
+\end{description}
+
\subsection{\texttt{tdplotgetpolarcoords}}
\begin{description}
diff --git a/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation_figures.tex b/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation_figures.tex
index 00f95a5c8f5..605b1ce9e70 100644
--- a/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation_figures.tex
+++ b/Master/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation_figures.tex
@@ -136,6 +136,7 @@
\newcommand{\threedalphabetagamma}{%
\ifpdf
+\beginpgfgraphicnamed{Figures/alphabetagamma}
\tdplotsetmaincoords{50}{140}
%
\begin{tikzpicture}[scale=2,tdplot_main_coords]
@@ -196,6 +197,7 @@
\tdplotdrawarc[color=orange!50!black]{(0,0,0)}{.2}{0}{60}{anchor=north east}{$\alpha$}
\end{tikzpicture}
+\endpgfgraphicnamed
\fi
}
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.