diff options
author | Karl Berry <karl@freefriends.org> | 2010-02-14 00:13:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-02-14 00:13:57 +0000 |
commit | 47988dce4e1e4623f5badc2237d4be68e95a2488 (patch) | |
tree | 1f1072305de7e8a961c10cba6abe192641bbb015 /Master/texmf-dist/tex/generic/pst-3d | |
parent | 08fc1629b2ad79d9d2b0526b720745e58535b65f (diff) |
pst-3d 1.10 (13feb10)
git-svn-id: svn://tug.org/texlive/trunk@17000 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-3d')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-3d/pst-3d.tex | 186 |
1 files changed, 62 insertions, 124 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-3d/pst-3d.tex b/Master/texmf-dist/tex/generic/pst-3d/pst-3d.tex index 9c84eebdf73..ec28ebb0aa1 100644 --- a/Master/texmf-dist/tex/generic/pst-3d/pst-3d.tex +++ b/Master/texmf-dist/tex/generic/pst-3d/pst-3d.tex @@ -1,106 +1,47 @@ -%% +%% $Id: pst-3d.tex 289 2010-02-13 14:35:35Z herbert $ %% This is file `pst-3d.tex', -%% generated with the docstrip utility. -%% -%% The original source files were: %% -%% pst-3d.dtx (with options: `pst-3d') -%% %% IMPORTANT NOTICE: -%% -%% For the copyright see the source file. -%% -%% Any modified versions of this file must be renamed -%% with new filenames distinct from pst-3d.tex. -%% -%% For distribution of the original source see the terms -%% for copying and modification in the file pst-3d.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-3d.dtx' +%% Package `pst-3d.tex' %% %% Timothy Van Zandt <tvz@nwu.edu> (tvz) -%% Herbert Voss <voss@pstricks.de> (hv) -%% -%% September 03, 2005 -%% -%% This file is under the LaTeX Project Public License -%% See CTAN archives in directory macros/latex/base/lppl.txt. +%% Herbert Voss <hvoss _at_ tug.org> (hv) +%% +%% 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-3d' is a PSTricks package for tilting and other pseudo-3D tricks %% - - +% +\csname PSTthreeDLoaded\endcsname +\let\PSTthreeDLoaded\endinput \ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi -\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % (hv 2005-09-03) +\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % (hv 2005-09-03) +% +\def\fileversion{1.10} +\def\filedate{2010/02/13} +\message{`PST-3d' v\fileversion, \filedate\space (tvz)} +% \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax \pst@addfams{pst-3d} -\def\fileversion{1.00} -\def\filedate{2005/09/03} -\message{`PST-3d' v\fileversion, \filedate\space (tvz)} -\csname PSTthreeDLoaded\endcsname -\let\PSTthreeDLoaded\endinput -\pst@def{SetMatrixThreeD}<% - dup sin /e ED cos /f ED - /p3 ED /p2 ED /p1 ED - p1 0 eq - { /a 0 def /b p2 0 le { 1 } { -1 } ifelse def - p3 p2 abs - } - { p2 0 eq - { /a p1 0 lt { -1 } { 1 } ifelse def /b 0 def - p3 p1 abs - } - { p1 dup mul p2 dup mul add sqrt dup - p1 exch div /a ED - p2 exch div neg /b ED - p3 p1 a div - } - ifelse - } - ifelse - atan dup sin /c ED cos /d ED - /Matrix3D - [ - b f mul c a mul e mul sub - a f mul c b mul e mul add - d e mul - b e mul neg c a mul f mul sub - a e mul neg c b mul f mul add - d f mul - ] def> -\pst@def{ProjThreeD}<% - /z ED /y ED /x ED - Matrix3D aload pop - z mul exch y mul add exch x mul add - 4 1 roll - z mul exch y mul add exch x mul add - exch> -\pst@def{SetMatrixEmbed}<% - \tx@SetMatrixThreeD - Matrix3D aload pop - /z3 ED /z2 ED /z1 ED /x3 ED /x2 ED /x1 ED - \tx@SetMatrixThreeD - [ - Matrix3D aload pop - z3 mul exch z2 mul add exch z1 mul add 4 1 roll - z3 mul exch z2 mul add exch z1 mul add - Matrix3D aload pop - x3 mul exch x2 mul add exch x1 mul add 4 1 roll - x3 mul exch x2 mul add exch x1 mul add - 3 -1 roll 3 -1 roll 4 -1 roll 8 -3 roll 3 copy - x3 mul exch x2 mul add exch x1 mul add 4 1 roll - z3 mul exch z2 mul add exch z1 mul add - ] - concat> + +%% prologue for postcript +% +\pstheader{pst-3d.pro}% +% +\def\tx@SetMatrixThreeD{ tx@3Ddict begin SetMatrixThreeD end } +\def\tx@ProjThreeD{ tx@3Ddict begin ProjThreeD end } +\def\tx@SetMatrixEmbed{ tx@3Ddict begin SetMatrixEmbed end } +\def\tx@TMSave{ tx@3Ddict begin TMSave end } +\def\tx@TMRestore{ tx@3Ddict begin TMRestore end } +\def\tx@TMChange{ tx@3Ddict begin TMChange end } +% \let\pssetzlength\pssetylength -\define@key[psset]{pst-3d}{viewpoint}{% +\define@key[psset]{pst-3d}{viewpoint}[1 -1 1]{% \pst@expandafter\psset@@viewpoint#1 {} {} {} \@nil \let\psk@viewpoint\pst@tempg} \def\psset@@viewpoint#1 #2 #3 #4\@nil{% @@ -112,55 +53,36 @@ \pst@number\pst@dima \pst@number\pst@dimb \pst@number\pst@dimc}% \endgroup} \psset[pst-3d]{viewpoint=1 -1 1} -\define@key[psset]{pst-3d}{viewangle}{% - \pst@getangle{#1}\psk@viewangle} +\define@key[psset]{pst-3d}{viewangle}[0]{\pst@getangle{#1}\psk@viewangle} \psset[pst-3d]{viewangle=0} -\define@key[psset]{pst-3d}{normal}{% +\define@key[psset]{pst-3d}{normal}[0 0 1]{% \pst@expandafter\psset@@viewpoint#1 {} {} {} \@nil \let\psk@normal\pst@tempg} \psset[pst-3d]{normal=0 0 1} -\define@key[psset]{pst-3d}{embedangle}{% - \pst@getangle{#1}\psk@embedangle} +\define@key[psset]{pst-3d}{embedangle}[0]{\pst@getangle{#1}\psk@embedangle} \psset[pst-3d]{embedangle=0} -\define@key[psset]{pst-3d}{Tshadowsize}{% - \pst@checknum{#1}\psTshadowsize} +\define@key[psset]{pst-3d}{Tshadowsize}[1]{\pst@checknum{#1}\psTshadowsize} \psset[pst-3d]{Tshadowsize=1} -\define@key[psset]{pst-3d}{Tshadowangle}{% - \pst@getangle{#1}\psk@Tshadowangle} +\define@key[psset]{pst-3d}{Tshadowangle}[60]{\pst@getangle{#1}\psk@Tshadowangle} \psset[pst-3d]{Tshadowangle=60} -\define@key[psset]{pst-3d}{Tshadowcolor}{% - \pst@getcolor{#1}\psTshadowcolor} +\define@key[psset]{pst-3d}{Tshadowcolor}[lightgray]{\pst@getcolor{#1}\psTshadowcolor} \psset[pst-3d]{Tshadowcolor=lightgray} - -\pst@def{TMSave}<% - tx@Dict /TMatrix known not { /TMatrix { } def /RAngle { 0 } def } if - /TMatrix [ TMatrix CM ] cvx def> -\pst@def{TMRestore}<% - CP /TMatrix [ TMatrix setmatrix ] cvx def moveto> -\pst@def{TMChange}<% - \tx@TMSave - /cp [ currentpoint ] cvx def % ??? Check this later. - CM - CP T \tx@STV - CM matrix invertmatrix % Inv(M') - matrix concatmatrix % M Inv(M') - exch exec - concat cp moveto> -\def\ThreeDput{\def\pst@par{}\pst@object{ThreeDput}} +% +\def\ThreeDput{\pst@object{ThreeDput}} \def\ThreeDput@i{\@ifnextchar({\ThreeDput@ii}{\ThreeDput@ii(\z@,\z@,\z@)}} \def\ThreeDput@ii(#1,#2,#3){% \pst@killglue\pst@makebox{\ThreeDput@iii(#1,#2,#3)}} \def\ThreeDput@iii(#1,#2,#3){% \begingroup - \use@par - \if@star\pst@starbox\fi - \pst@makesmall\pst@hbox - \pssetxlength\pst@dima{#1}% - \pssetylength\pst@dimb{#2}% - \pssetzlength\pst@dimc{#3}% - \leavevmode - \hbox{% - \pst@Verb{% + \use@par + \if@star\pst@starbox\fi + \pst@makesmall\pst@hbox + \pssetxlength\pst@dima{#1}% + \pssetylength\pst@dimb{#2}% + \pssetzlength\pst@dimc{#3}% + \leavevmode + \hbox{% + \pst@Verb{% { \pst@number\pst@dima \pst@number\pst@dimb \pst@number\pst@dimc @@ -174,6 +96,7 @@ \pst@Verb{\tx@TMRestore}}% \endgroup \ignorespaces} +% \def\pst@sinandcos#1{% \begingroup \pst@dima=#1\relax @@ -202,6 +125,7 @@ \global\pst@dimg\pst@dimb \global\pst@dimh\pst@dimc \endgroup} +% \def\pst@getsinandcos#1{% \pst@dimg=100000sp \pst@dimg=#1\pst@dimg @@ -234,6 +158,7 @@ \pst@dimtonum\pst@dimh\pst@cos \fi% } +% \def\pstilt#1{\pst@makebox{\pstilt@{#1}}} \def\pstilt@#1{% \begingroup @@ -276,6 +201,7 @@ \pst@Verb{\tx@TMRestore}% \kern\pst@dima}% \endgroup} +% \def\psTilt#1{\pst@makebox{\psTilt@{#1}}} \def\psTilt@#1{% \begingroup @@ -317,6 +243,7 @@ \pst@Verb{\tx@TMRestore}% \kern\pst@dima}% \endgroup} +% \def\psshadow{\pst@object{psshadow}} \def\psshadow@i{\pst@makebox{\psshadow@ii}} \def\psshadow@ii{% @@ -343,6 +270,17 @@ \pst@Verb{\tx@TMRestore}% \box\pst@hbox}% \endgroup} +% +\def\psAffinTransform{\pst@object{psAffinTransform}} +\def\psAffinTransform@i#1{ + \begin@SpecialObj% + \pst@makebox{\psAffinTransform@ii{#1}}}% +\def\psAffinTransform@ii#1{% + \pst@Verb{ { [#1] concat } \tx@TMChange }% + \box\pst@hbox \pst@Verb{ \tx@TMRestore }% + \end@SpecialObj} +\makeatother +% \catcode`\@=\PstAtCode\relax \endinput %% |