From 0a11b23c3bc0c1e82d3eb3d880e4bd642660259d Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 18 Apr 2014 23:32:15 +0000
Subject: pst-perspective (18apr14)

git-svn-id: svn://tug.org/texlive/trunk@33524 c570f23f-e606-0410-a88d-b1316a301751
---
 .../generic/pst-perspective/pst-perspective.tex    | 145 ++++++++++++++++++++-
 1 file changed, 140 insertions(+), 5 deletions(-)

(limited to 'Master/texmf-dist/tex/generic/pst-perspective/pst-perspective.tex')

diff --git a/Master/texmf-dist/tex/generic/pst-perspective/pst-perspective.tex b/Master/texmf-dist/tex/generic/pst-perspective/pst-perspective.tex
index 76274535f8b..85848c9b4f8 100644
--- a/Master/texmf-dist/tex/generic/pst-perspective/pst-perspective.tex
+++ b/Master/texmf-dist/tex/generic/pst-perspective/pst-perspective.tex
@@ -14,11 +14,11 @@
 %
 \csname PSTperspectiveLoaded\endcsname
 \let\PSTperspectiveLoaded\endinput
-%\ifx\PSTEuclideLoaded\endinput \else\input pst-eucl     \fi
-%\ifx\PSTricksAddLoaded\endinput\else\input pstricks-add \fi
+\ifx\PSTGradLoaded\endinput \else\input pst-grad \fi
+\ifx\PSTricksAddLoaded\endinput\else\input pstricks-add \fi
 %
-\def\fileversion{0.01}
-\def\filedate{2014/02/21}
+\def\fileversion{1.04}
+\def\filedate{2014/04/18}
 \message{ v\fileversion, \filedate (ts)}
 \message{ v\fileversion, \filedate}
 \edef\TheAtCode{\the\catcode`\@}
@@ -31,6 +31,12 @@
 \define@boolkey[psset]{pst-perspective}[Pst@]{differentcol}[false]{} % unterschiedliche Farben der Fl\"{a}chen
 \define@boolkey[psset]{pst-perspective}[Pst@]{LowPoint}[false]{} % Basis durch z.B. tief liegenden Pkt
 \define@boolkey[psset]{pst-perspective}[Pst@]{symX}[true]{} % Symmetrieachse bei spiegelverkehrten Bildern
+\define@key[psset]{pst-perspective}{topfillstyle}[solid]{\def\psk@transTS@topfillstyle{#1}}
+\define@key[psset]{pst-perspective}{topangle}[45]{\def\psk@transTS@topangle{#1}}
+\define@key[psset]{pst-perspective}{topmidpoint}[0.5]{\def\psk@transTS@topmidpoint{#1}}
+\define@key[psset]{pst-perspective}{toplinecolor}[black]{\def\psk@transTS@toplinecolor{#1}}
+\define@key[psset]{pst-perspective}{topfillcolor}[gray]{\def\psk@transTS@topfillcolor{#1}}
+\define@key[psset]{pst-perspective}{toplinewidth}[0.8pt]{\def\psk@transTS@toplinewidth{#1}}
 \define@key[psset]{pst-perspective}{hidecolor}[black!80]{\def\psk@transTS@hidecolor{#1}}
 \define@key[psset]{pst-perspective}{facecolorT}[yellow]{\def\psk@transTS@facecolorT{#1}}
 \define@key[psset]{pst-perspective}{facecolorR}[red]{\def\psk@transTS@facecolorR{#1}}
@@ -55,7 +61,9 @@
 \psset[pst-perspective]{phi=45,vkf=0.5,base=0,translineA=false,translineB=false,transAcolor=green,transBcolor=blue,differentcol=false,%
 transAlinewidth=0.7pt,transBlinewidth=0.7pt,transAlinestyle=dashed,transBlinestyle=dashed,deltaphi=0,facecolorT=yellow,facecolorR=red,%
 symline=0,symX=true,hidecolor=black!80,translineK=true,transcolor=blue,translinewidth=0.8pt,translinestyle=solid,%
-LowPoint=false,LowP={0,0},originT={0,0},hideline=false,hidelinewidth=0.7pt,hidelinestyle=dashed}%
+LowPoint=false,LowP={0,0},originT={0,0},hideline=false,hidelinewidth=0.7pt,hidelinestyle=dashed,%
+topfillstyle=solid,topangle=45,topmidpoint=0.5,toplinecolor=black,toplinewidth=0.8pt,topfillcolor=gray%
+}%
 \SpecialCoor%
 \def\ba{\psk@transTS@base}
 \def\pstransTS{\pst@object{pstpstransTS}}%
@@ -266,6 +274,133 @@ l2 \psk@transTS@phi 180 add PtoC #3 add exch #2 #5 add add exch)%
 \endgroup
 \ignorespaces
 }
+%------------------------------------------------------------------
+\def\psCircleTS{\pst@object{pstpsCircleTS}}%
+\def\pstpsCircleTS@i#1{%
+\begingroup%
+\pst@killglue
+\use@par
+\def\punkte{}
+\multido{\i=0+3}{120}{%
+\pstransTS(#1;\i){AnfPktC\i}{EndPktC'\i}
+\xdef\punkte{\punkte(EndPktC'\i)}}
+\expandafter\psccurve\punkte
+\endgroup
+\ignorespaces
+}
+%--------------------------------------------------------------------------------
+%------------------------------------------------------------------
+\def\psCircleTSX{\pst@object{pstpsCircleTSX}}%
+\def\pstpsCircleTSX@i#1{%
+\begingroup%
+\pst@killglue
+\use@par
+\def\punkte{}
+\multido{\i=0+3}{120}{%
+\pstransTSX(#1;\i){AnfPktC\i}{EndPktC'\i}
+\xdef\punkte{\punkte(EndPktC'\i)}}
+\expandafter\psccurve\punkte
+\endgroup
+\ignorespaces
+}
+%--------------------------------------------------------------------------------
+%------------------------------------------------------------------
+\def\psArcTS{\pst@object{pstpsArcTS}}%
+\def\pstpsArcTS@i#1#2#3{%
+\begingroup%
+\pst@killglue
+\use@par
+\pst@Verb{%
+/v \psk@transTS@vkf def%
+/ph \psk@transTS@phi def%
+/t 1 v 2 exp sub v 4 exp 2 v 2 exp mul 2 ph mul cos mul add 1 add sqrt div def%
+/ws 2 sqrt 2 div 1 t sub sqrt mul ASIN 180 mul Pi div def%
+}
+\def\punkte{}
+\multido{\r=0+1}{#3}{%
+\pstransTS(! #1 ws #2 add \r\space add PtoC){AnfPkt}{EndPkt\r}
+\xdef\punkte{\punkte(EndPkt\r)}}
+\expandafter\pscurve\punkte
+\endgroup
+\ignorespaces
+}
+%--------------------------------------------------------------------------------
+%------------------------------------------------------------------
+\def\psArcTSX{\pst@object{pstpsArcTSX}}%
+\def\pstpsArcTSX@i#1#2#3{%
+\begingroup%
+\pst@killglue
+\use@par
+\pst@Verb{%
+/v \psk@transTS@vkf def%
+/ph \psk@transTS@phi def%
+/t 1 v 2 exp sub v 4 exp 2 v 2 exp mul 2 ph mul cos mul add 1 add sqrt div def%
+/ws 2 sqrt 2 div 1 t sub sqrt mul ASIN 180 mul Pi div def%
+}
+\def\punkte{}
+\multido{\r=0+1}{#3}{%
+\pstransTSX(! #1 ws 90 add #2 add \r\space add PtoC){AnfPkt}{EndPkt\r}
+\xdef\punkte{\punkte(EndPkt\r)}}
+\expandafter\pscurve\punkte
+\endgroup
+\ignorespaces
+}
+%--------------------------------------------------------------------------------
+%------------------------------------------------------------------
+\def\psZylinderTS{\pst@object{pstpsZylinderTS}}%
+\def\pstpsZylinderTS@i#1#2{%
+\begingroup%
+\pst@killglue
+\use@par
+\pst@Verb{%
+/v \psk@transTS@vkf def%
+/ph \psk@transTS@phi def%
+/t 1 v 2 exp sub v 4 exp 2 v 2 exp mul 2 ph mul cos mul add 1 add sqrt div def%
+/ws 2 sqrt 2 div 1 t sub sqrt mul ASIN 180 mul Pi div def%
+/Ra 0.5 1 t add mul 1 v 2 exp sub mul v 2 exp add v ph cos mul 1 t 2 exp sub sqrt mul add sqrt def%
+/Rb 0.5 1 t sub mul 1 v 2 exp sub mul v 2 exp add v ph cos mul 1 t 2 exp sub sqrt mul sub sqrt def%
+/we 2 sqrt 2 div 1 t sub sqrt mul v mul ph sin mul Ra div ASIN 180 mul Pi div def%
+}
+\def\punkteA{}
+\def\punkteB{}
+\def\punkteC{}
+\def\punkteD{}
+\multido{\r=0+1}{180}{%
+\pstransTS[originT={0,0}](! #1 ph 0 ge {ws 180 add} {ws} ifelse \r\space add PtoC){ZylA\r}{ZylA'\r}%
+\xdef\punkteA{\punkteA(ZylA'\r)}}%
+\multido{\rB=0+1}{180}{%
+\pstransTS[originT={0,#2}](! #1 ph 0 ge {ws} {ws 180 add} ifelse \rB\space add PtoC){ZylB\rB}{ZylB'\rB}%
+\xdef\punkteB{\punkteB(ZylB'\rB)}}%
+\multido{\rC=0+1}{180}{%
+\pstransTS[originT={0,0}](! #1 ws \rC\space add PtoC){ZylC\rC}{ZylC'\rC}%
+\xdef\punkteC{\punkteC(ZylC'\rC)}}%
+\multido{\rD=0+1}{360}{%
+\pstransTS[originT={0,#2}](#1;\rD){ZylD\rD}{ZylD'\rD}%
+\xdef\punkteD{\punkteD(ZylD'\rD)}}%
+%-----------------------------------------------
+\pscustom{%
+\expandafter\pscurve\punkteA%
+\rlineto(0,#2)
+\expandafter\pscurve\punkteB%
+\closepath%
+}%
+%-----------------------------------------------
+\pscustom[fillstyle=\psk@transTS@topfillstyle,gradangle=\psk@transTS@topangle,gradmidpoint=\psk@transTS@topmidpoint,linecolor=\psk@transTS@toplinecolor,%
+linewidth=\psk@transTS@toplinewidth,fillcolor=\psk@transTS@topfillcolor]{%
+\expandafter\psccurve\punkteD%
+\closepath
+}%
+%\psrotate(0,#2){! we}{%
+%\psellipse[fillstyle=\psk@transTS@topfillstyle,gradangle=\psk@transTS@topangle,gradmidpoint=\psk@transTS@topmidpoint,linecolor=\psk@transTS@toplinecolor,%
+%linewidth=\psk@transTS@toplinewidth,fillcolor=\psk@transTS@topfillcolor](0,#2)(!Ra #1 mul Rb #1 mul)}%
+\ifPst@hideline
+\psset{linecolor=\psk@transTS@hidecolor,linestyle=\psk@transTS@hidelinestyle,linewidth=\psk@transTS@hidelinewidth}%
+\expandafter\pscurve\punkteC%
+\else \fi%
+\endgroup
+\ignorespaces
+}
+%--------------------------------------------------------------------------------
 \catcode`\@=\TheAtCode\relax
 \endinput
 %%
-- 
cgit v1.2.3

