diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-gr3d/pst-gr3d.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-gr3d/pst-gr3d.tex | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-gr3d/pst-gr3d.tex b/Master/texmf-dist/tex/generic/pst-gr3d/pst-gr3d.tex new file mode 100644 index 00000000000..8bb39f06c6f --- /dev/null +++ b/Master/texmf-dist/tex/generic/pst-gr3d/pst-gr3d.tex @@ -0,0 +1,190 @@ +%% +%% This is file `pst-gr3d.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pst-gr3d.dtx (with options: `pst-gr3d') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from pst-gr3d.tex. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file pst-gr3d.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% +%% Package `pst-gr3d.dtx' +%% +%% Denis Girou (CNRS/IDRIS - France) <Denis.Girou@idris.fr> +%% Herbert Voss <voss@perce.de> +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `pst-gr3d' is a PSTricks package to draw three dimensional grids +%% with various customization +%% +\def\fileversion{1.34} +\def\filedate{2005/09/12} +\message{`PST-Grid3d' v\fileversion, \filedate\space (Denis Girou)} +\csname PSTGridThreeDLoaded\endcsname +\let\PSTGridThreeDLoaded\endinput +\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi +\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi +\ifx\PSTthreeDLoaded\endinput\else\input pst-3d.tex\fi +\ifx\MultidoLoaded\endinput\else\input multido.tex\fi +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey\fi +%% +\edef\PstAtCode{\the\catcode`\@}\catcode`\@=11\relax +\pst@addfams{pst-gr3d} +%% +%% change Pst@Debug to prevent a clash with pst-fill +%% which has the same option. Now pstricks defines Pst@Debug +%%\define@key[psset]{pst-gr3d}{PstDebug}{\pst@getint{#1}{\Pst@Debug}} +%% end hv 2004-06-22 +\newif\ifPst@PstPicture +\define@key[psset]{pst-gr3d}{PstPicture}[true]{\@nameuse{Pst@PstPicture#1}} +\newif\ifPstGridThreeD@Nodes +\define@key[psset]{pst-gr3d}{GridThreeDNodes}[true]{% + \@nameuse{PstGridThreeD@Nodes#1}} +\define@key[psset]{pst-gr3d}{GridThreeDXUnit}{% + \pst@getint{#1}{\PstGridThreeD@XUnit}} +\define@key[psset]{pst-gr3d}{GridThreeDYUnit}{% + \pst@getint{#1}{\PstGridThreeD@YUnit}} +\define@key[psset]{pst-gr3d}{GridThreeDZUnit}{% + \pst@getint{#1}{\PstGridThreeD@ZUnit}} +\define@key[psset]{pst-gr3d}{GridThreeDXPos}{% + \pst@getint{#1}{\PstGridThreeD@XPos}} +\define@key[psset]{pst-gr3d}{GridThreeDYPos}{% + \pst@getint{#1}{\PstGridThreeD@YPos}} +\define@key[psset]{pst-gr3d}{GridThreeDZPos}{% + \pst@getint{#1}{\PstGridThreeD@ZPos}} +\define@key[psset]{pst-gr3d}{Rx}{\psset{XnodesepA=#1}} +\define@key[psset]{pst-gr3d}{Ry}{\psset{offsetA=#1}} +\psset{viewpoint=1.2 -0.6 0.8} +\psset{% +PstDebug=0,PstPicture=true,GridThreeDNodes=false, +GridThreeDXPos=0,GridThreeDYPos=0,GridThreeDZPos=0, +GridThreeDXUnit=1,GridThreeDYUnit=1,GridThreeDZUnit=1} +\def\PstGridThreeD{\@ifnextchar[{\PstGridThreeD@i}{\PstGridThreeD@i[]}} +\def\PstGridThreeD@i[#1](#2,#3,#4){{% +\psset{dimen=middle}% +\psset{#1}% +\pst@cnth=#2 +\multiply\pst@cnth\PstGridThreeD@XUnit +\divide\pst@cnth\tw@ +\ifodd\pst@cnth + \edef\PstGridThreeD@PictureYmin{-\the\pst@cnth}% +\else + \edef\PstGridThreeD@PictureYmin{-\the\pst@cnth.5}% +\fi +\pst@cntg=#3 +\multiply\pst@cntg\PstGridThreeD@YUnit +\pst@cnth=#2 +\divide\pst@cnth\tw@ +\multiply\pst@cnth\PstGridThreeD@XUnit +\advance\pst@cntg\pst@cnth +\pst@cnth=#3 +\advance\pst@cnth\m@ne +\multiply\pst@cnth\PstGridThreeD@YUnit +\divide\pst@cnth\tw@ +\pst@cntd=#4 +\multiply\pst@cntd\PstGridThreeD@ZUnit +\advance\pst@cntd\pst@cnth +\ifnum\pst@cnth=\z@ + \edef\PstGridThreeD@PictureYmax{\the\pst@cntd.5}% +\else + \edef\PstGridThreeD@PictureYmax{\the\pst@cntd}% +\fi +\ifPst@PstPicture + \ifnum\Pst@Debug=\@ne + \psframebox[framesep=0]{% + \fi + \pspicture(0,\PstGridThreeD@PictureYmin) + (\the\pst@cntg,\PstGridThreeD@PictureYmax) +\fi +\pst@cntd=\PstGridThreeD@XPos +\multiply\pst@cntd\PstGridThreeD@XUnit +\pst@cntg=\PstGridThreeD@YPos +\multiply\pst@cntg\PstGridThreeD@YUnit +\pst@cnth=\PstGridThreeD@ZPos +\multiply\pst@cnth\PstGridThreeD@ZUnit +\ifx\PstGridThreeDHookZFace\empty +\else + \pst@cntc=#4 + \advance\pst@cntc\@ne + \multido{\iz=#4+-\PstGridThreeD@ZUnit}{\pst@cntc}{% Z face hook + \ThreeDput[normal=0 0 1](\pst@cntd,\pst@cntg,\iz){\PstGridThreeDHookZFace}} +\fi +\pst@cntc=#2 +\advance\pst@cntc\@ne +\multido{\ix=\pst@cntd+\PstGridThreeD@XUnit}{\pst@cntc}{% + \ThreeDput[normal=1 0 0](\ix,\pst@cntg,\pst@cnth){% + \PstGridThreeDHookXFace + \psgrid[xunit=\PstGridThreeD@YUnit,yunit=\PstGridThreeD@ZUnit, + subgriddiv=0,gridlabels=0](#3,#4)}} +\pst@cnta=#3 +\multiply\pst@cnta\PstGridThreeD@YUnit +\advance\pst@cnta\pst@cntg +\pst@cntc=#3 +\advance\pst@cntc\@ne +\multido{\iy=\pst@cnta+-\PstGridThreeD@YUnit}{\pst@cntc}{% + \ThreeDput[normal=0 1 0](\pst@cntd,\iy,\pst@cnth){% + \PstGridThreeDYFace{#2}{#4}{\iy}}} +\PstGridThreeD@HookEnd +\ifPst@PstPicture + \endpspicture + \ifnum\Pst@Debug=\@ne +} + \fi +\fi}} +\def\PstGridThreeDYFace#1#2#3{% +\PstGridThreeDHookYFace% +\psgrid[xunit=\PstGridThreeD@XUnit,yunit=\PstGridThreeD@ZUnit, + subgriddiv=0,gridlabels=0](-#1,#2) +\pst@cnta=#1 +\advance\pst@cnta\@ne +\pst@cntb=#2 +\advance\pst@cntb\@ne +\pst@cntg=#3 +\multido{\ia=0+-\PstGridThreeD@XUnit}{\pst@cnta}{% + \pst@cntc=\multidocount + \advance\pst@cntc\m@ne + \multido{\ib=0+\PstGridThreeD@ZUnit}{\pst@cntb}{% + \ifPstGridThreeD@Nodes + \pst@cntd=\multidocount + \advance\pst@cntd\m@ne + \pnode(\ia,\ib){Gr3dNode\the\pst@cntc\the\pst@cntg\the\pst@cntd} + \fi + \ifx\PstGridThreeDHookNode\empty + \else + \rput(\ia,\ib){\PstGridThreeDHookNode} + \fi}}} +\def\PstGridThreeDHookNode{} +\def\PstGridThreeDHookXFace{} +\def\PstGridThreeDHookYFace{} +\def\PstGridThreeDHookZFace{} +\def\PstGridThreeDHookEnd{} +\def\PstGridThreeD@HookEnd{% +\def\PstGridThreeD@HookEnd{}% +\PstGridThreeDHookEnd} +\def\PstGridThreeDNodeProcessor#1{{% +\psset{unit=0.3} +\pspicture(-0.5,-0.5)(0.5,0.5) + \pscircle*[linecolor=#1]{0.5} + \pscircle*[linecolor=white]{0.2} +\endpspicture}} +\catcode`\@=\PstAtCode\relax +\endinput +%% +%% End of file `pst-gr3d.tex'. |