diff options
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-3dplot/Changes | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.pdf | bin | 2274896 -> 2250617 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.tex | 125 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro | 381 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/pst-3dplot/Makefile | 48 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex | 90 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty | 5 |
7 files changed, 557 insertions, 101 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/Changes b/Master/texmf-dist/doc/generic/pst-3dplot/Changes index 43a46d7cf30..55fcfc45286 100644 --- a/Master/texmf-dist/doc/generic/pst-3dplot/Changes +++ b/Master/texmf-dist/doc/generic/pst-3dplot/Changes @@ -1,6 +1,7 @@ pst-3dplot.pro -------- -0.24 2006-08-30 - add code for special node calculating -0.23 2007-08-18 - add coorType 0,1,2 code for convertTo2D +0.25 2007-12-22 - add code for special rotating (Darrell Lamm) +0.24 2007-08-30 - add code for special node calculating +0.23 2007-08-18 - add coorType 0,1,2,3 code for convertTo2D - add code IIIDCylinder and cylindrical coordinates - add code for \psBox and \psCylinder 0.22 2006-01-11 add code for left-Handed coor (experimental) @@ -10,6 +11,10 @@ pst-3dplot.pro -------- pst-3dplot.tex -------- +1.78 2007-10-11 - fix bug in \parametricPlotThreeD + - add option Debug=false|true for addtional + comments written into the log file + - add extended rotation stuff (Darrell Lamm) 1.77 2007-10-03 - fix trailing spaces in \pstThreeDNode 1.76 2007-08-30 - add optional argument nodeType for different setting the node depending to a line and a plain diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.pdf b/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.pdf Binary files differindex e391cc760c1..10560d50bad 100644 --- a/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.tex b/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.tex index dbc52557da2..d0113649230 100644 --- a/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-3dplot/pst-3dplot-doc.tex @@ -499,7 +499,7 @@ % \begin{document} -\author{Herbert Voß\thanks{voss@perce.de}} +\author{Darrell Lamm\thanks{darrell.lamm@gtri.gatech.edu} \and Herbert Voß\thanks{hv@pstricks.de}} \date{\today} \title{3D plots: PST-3dplot v\myFV\\Documentation} @@ -742,7 +742,13 @@ IIIDzticksep & <value> & 0.2\\ RotX & <angle> & 0\\ RotY & <angle> & 0\\ RotZ & <angle> & 0\\ -RotSequence & xyz|xzy|yxz|yzx|zxy|zyx & xyz\\ +RotAngle & <angle> & 0\\ +xRotVec & <angle> & 0\\ +yRotVec & <angle> & 0\\ +zRotVec & <angle> & 0\\ +RotSequence & xyz|xzy|yxz|yzx|zxy|zyx|quaternion & xyz\\ +RotSet & set|concat|keep & set\\ +eulerRotation & true|false & false\\ \end{longtable} } @@ -917,7 +923,6 @@ The angle \texttt{Alpha} is only valid for placing the ticks, if any. The angle \end{pspicture} \end{LTXexample} - With \texttt{coorType=3} the y--z-axes are orthogonal and the angle between x- and y-axis is always 45 degrees and the x-axis is shortened by a factor of $1/\sqrt{2}$. The angle \texttt{Alpha} is only valid for placing the ticks, if any. The angle \texttt{Beta} is not valid. @@ -931,7 +936,6 @@ The angle \texttt{Alpha} is only valid for placing the ticks, if any. The angle \end{LTXexample} - \clearpage \section{Rotation} @@ -981,7 +985,87 @@ additional one for the rotating sequence, which can be any combination of the th \end{LTXexample} +It is sometimes more convenient to rotate the coordinate system by +specifying a \emph{single} angle of rotation \verb+RotAngle+ (in degrees) +about a vector whose coordinates are \verb+xRotVec+, \verb+yRotVec+, +and \verb+zRotVec+ using the \verb+quaternion+ option for \verb+RotSequence+. + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-3,-1.8)(3,3) +\multido{\iA=0+10}{18}{% + \pstThreeDCoor[linecolor=red, RotSequence=quaternion, RotAngle=\iA, xRotVec=3,yRotVec=0,zRotVec=3, + xMin=0,xMax=3, yMin=0,yMax=3, zMin=0,zMax=3]} +\pstThreeDCoor[linecolor=blue, RotSequence=quaternion, RotAngle=0, xRotVec=0, yRotVec=0, zRotVec=1, + xMin=0,xMax=3, yMin=0,yMax=3, zMin=0,zMax=3] +\pstThreeDLine[linecolor=blue, linewidth=2pt, arrows=->](0,0,0)(3,0,3) +\uput[0](-2.28,1.2){$\vec{R}_\Phi$} +\end{pspicture} +\end{LTXexample} + +Rotations of the coordinate system may be ``accumulated'' by applying +successive rotation sequences using the \verb+RotSet+ variable, +which is set either as a \verb+pst-3dplot+ object's optional argument, or +with a \verb+\psset[pst-3dplot]{RotSet=value}+ +command. The usual \TeX{} scoping rules for the value of \verb+RotSet+ +hold. The following are valid values of \verb+RotSet+: +\begin{itemize} +\item \verb+set+: Sets the rotation matrix using the rotation +parameters. This is the default value for \verb+RotSet+ and is +what is used if \verb+RotSet+ is not set as an option for the +\verb+pst-3dplot+ object, or if not previously +set within the object's scope by a \verb+\psset[pst-3dplot]{RotSet=val}+ +command. +\item \verb+concat+: Concatenates the current rotation matrix with +a the new rotation that is defined by the rotation parameters. This option +is most useful when multiple \verb+\\pstThreeDCoor+ calls are made, +with or without actual plotting of the axes, +to accumulate rotations. A previous value of \verb+RotSet=set+ +must have been made! +\item \verb+keep+: Keeps the current rotation matrix, ignoring the +rotation parameters. Mostly used internally to eliminate redundant +calculations. +\end{itemize} + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-3,-3)(3.6,3) +\pstThreeDCoor[linecolor=blue, RotSequence=quaternion, RotAngle=0, RotSet=set, xRotVec=0,yRotVec=0,zRotVec=1, + xMin=0,xMax=3, yMin=0,yMax=3, zMin=0,zMax=3] + \pstThreeDCoor[linecolor=green, RotSequence=quaternion, RotSet=concat, RotAngle=22.5, xRotVec=0,yRotVec=0,zRotVec=1, + xMin=0,xMax=3, yMin=0,yMax=3, zMin=-0.6,zMax=3] + \pstThreeDCoor[linecolor=yellow, RotSequence=quaternion, RotSet=concat, RotAngle=30, xRotVec=0,yRotVec=1,zRotVec=0, + xMin=0,xMax=3,yMin=-0.6,yMax=3, zMin=0,zMax=3] + \pstThreeDCoor[linecolor=red, RotSequence=quaternion, RotSet=concat, RotAngle=60, xRotVec=1,yRotVec=0,zRotVec=0, + xMin=-0.6,xMax=3, yMin=0,yMax=3, zMin=0,zMax=3]% +\end{pspicture} +\end{LTXexample} + +By default, the rotations defined by \verb+RotX+, \verb+RotY+, and +\verb+RotZ+ are rotations about the \emph{original} coordinate system's, +$x$, $y$, or $z$ +axes, respectively. More traditionally, however, these rotation angles +are defined as rotations about the rotated coordinate system's \emph{current}, +$x$, $y$, or $z$ axis. The \verb+pst-3dplot+ variable option +\verb+eulerRotation+ can be set to \verb+true+ to activate Euler angle +definitions; i.e., \verb+eulerRotation=true+. The default is +\verb+eulerRotation=false+. +\begin{LTXexample}[pos=t] +\begin{pspicture}(-4,-5)(6,5) + \pstThreeDCoor[linecolor=red, RotSequence=zyx, RotZ=90,RotY=90,RotX=0, + xMin=0,xMax=5, yMin=0,yMax=5, zMin=0,zMax=5] + \pstThreeDCoor[linecolor=blue, RotSequence=zyx, RotZ=0,RotY=0,RotX=0, + xMin=0,xMax=2.5, yMin=0,yMax=2.5, zMin=0,zMax=2.5] +\end{pspicture} +\end{LTXexample} + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-3,-5)(7,5) + \pstThreeDCoor[eulerRotation=true, linecolor=red, RotSequence=zyx, RotZ=90, RotY=90, RotX=0, + xMin=0,xMax=5, yMin=0,yMax=5, zMin=0,zMax=5] + \pstThreeDCoor[linecolor=blue, RotSequence=zyx, RotZ=0,RotY=0,RotX=0, + xMin=0,xMax=2.5, yMin=0,yMax=2.5, zMin=0,zMax=2.5] +\end{pspicture} +\end{LTXexample} \clearpage \psset{unit=1cm,gridlabels=7pt} @@ -2171,9 +2255,16 @@ values for the option \verb|drawStyle| : \item \verb|yxLines| Curves are first drawn in y and then in x direction \end{itemize} -In fact of the inner loop it is only possible to get a closed curve in the defined direction. For lines in x direction less \verb|yPlotpoints| are no problem, in difference to \verb|xPlotpoints|, especially for the plotstyle options \verb|line| and \verb|dots|. +In fact of the inner loop it is only possible to get a closed curve in the defined direction. +For lines in x direction less \verb|yPlotpoints| are no problem, in difference to +\verb|xPlotpoints|, especially for the plotstyle options \verb|line| and \verb|dots|. -Drawing three dimensional functions with curves which are transparent makes it difficult to see if a point is before or behind another one. \verb|\psplotThreeD| has an option \verb|hiddenLine| for a primitive hidden line mode, which only works when the y-intervall is defined in a way that $y_2>y_1$. Then every new curve is plotted over the forgoing one and filled with the color white. Figure \ref{fig:3dfunc-hidden} is the same as figure \ref{fig:3dfunc}, only with the option \verb|hiddenLine=true|. +Drawing three dimensional functions with curves which are transparent makes it difficult +to see if a point is before or behind another one. \verb|\psplotThreeD| has an option +\verb|hiddenLine| for a primitive hidden line mode, which only works when the y-intervall +is defined in a way that $y_2>y_1$. Then every new curve is plotted over the forgoing one +and filled with the color white. Figure~\ref{fig:3dfunc-hidden} is the same as +figure~\ref{fig:3dfunc}, only with the option \verb|hiddenLine=true|. \begin{lstlisting} \begin{pspicture}(-6,-4)(6,5) @@ -2331,7 +2422,9 @@ Parametric plots are only possible for drawing curves or areas. The syntax for \parametricplotThreeD(t1,t2)(u1,u2){<three parametric functions x y z} \end{verbatim} -The only possible variables are \verb|t| and \verb|u| with \verb|t1,t2| and \verb|u1,u2| as the range for the parameters. The order for the functions is not important and \verb|u| may be optional when having only a three dimensional curve and not an area. +The only possible variables are \verb|t| and \verb|u| with \verb|t1,t2| and \verb|u1,u2| as the +range for the parameters. The order for the functions is not important and \verb|u| may be +optional when having only a three dimensional curve and not an area. \begin{align} \begin{array}{rl} x & =f(t,u)\\ @@ -2348,7 +2441,10 @@ To draw a spiral we have the parametric functions: \end{array} \end{align} -In the example the $t$ value is divided by $600$ for the \verb|z| coordinate, because we have the values for $t$ in degrees, here with a range of $0\mbox{°}\ldots 2160\mbox{°}$. Drawing a curve in a three dimensional coordinate system does only require one parameter, which has to be by default \verb|t|. In this case we do not need all parameters, so that one can write +In the example the $t$ value is divided by $600$ for the \verb|z| coordinate, because we have the +values for $t$ in degrees, here with a range of $0\mbox{°}\ldots 2160\mbox{°}$. Drawing a curve in +a three dimensional coordinate system does only require one parameter, which has to be by default +\verb|t|. In this case we do not need all parameters, so that one can write \begin{verbatim} \parametricplotThreeD(t1,t2){<three parametric functions x y z} @@ -2366,7 +2462,9 @@ which is the same as \verb|(0,0)| for the parameter \verb|u|. \end{LTXexample} -Instead of using the \verb|\pstThreeDSphere| macro (see section \ref{sec:spheres}) it is also possible to use parametric functions for a sphere. The macro plots continous lines only for the \verb|t| parameter, so a sphere plotted with the longitudes need the parameter equations as +Instead of using the \verb|\pstThreeDSphere| macro (see section \ref{sec:spheres}) it is also +possible to use parametric functions for a sphere. The macro plots continous lines only for +the \verb|t| parameter, so a sphere plotted with the longitudes need the parameter equations as \begin{align} \begin{array}{l} x = \cos t \cdot \sin u\\ @@ -2505,7 +2603,9 @@ The syntax is \dataplotThreeD[<options>]{<data object>} \end{verbatim} -In difference to the macro \CMD{fileplotThreeD} the \CMD{dataplotThreeD} cannot plot any external data without reading this with the macro \CMD{readdata} which reads external data and save it in a macro, f.ex.: \CMD{dataThreeD}.\cite{dtk02.2:jackson.voss:plot-funktionen} +In difference to the macro \CMD{fileplotThreeD} the \CMD{dataplotThreeD} cannot plot any external data +without reading this with the macro \CMD{readdata} which reads external data and save it in a macro, +f.ex.: \CMD{dataThreeD}.\cite{dtk02.2:jackson.voss:plot-funktionen} \begin{verbatim} \readdata{<data object>}{<datafile>} @@ -2520,7 +2620,8 @@ In difference to the macro \CMD{fileplotThreeD} the \CMD{dataplotThreeD} cannot \dataplotThreeD[plotstyle=line]{\dataThreeD} \end{pspicture}% \end{LTXexample} -\caption{Demonstration of \texttt{\textbackslash dataplotThreeD} with \texttt{Alpha=-30} and \texttt{Beta=30}}\label{fig:fileplot} +\caption{Demonstration of \texttt{\textbackslash dataplotThreeD} with \texttt{Alpha=-30} and +\texttt{Beta=30}}\label{fig:fileplot} \end{figure} @@ -2709,7 +2810,7 @@ error. In this case save prevent expanding with e.g.: \verb+\psset{nameX=$\noexp \section{Credits} -Bruce Burlton | Christophe Jorssen | Chris Kuklewicz | Thorsten Suhling +Bruce Burlton | Christophe Jorssen | Chris Kuklewicz | Thorsten Suhling \bgroup \nocite{*} diff --git a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro index 12f52ad1443..251f0612ff5 100644 --- a/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro +++ b/Master/texmf-dist/dvips/pst-3dplot/pst-3dplot.pro @@ -15,22 +15,24 @@ %% `pst-3dplot' is a PSTricks package to draw 3d curves and graphical objects %% %% -%% version 0.23 / 2007-08-18 Herbert Voss <voss _at_ PSTricks.de> +%% version 0.25 / 2007-12-22 Herbert Voss <voss _at_ PSTricks.de> +%% with contributions of Darrell Lamm <darrell.lamm _at_ gtri.gatech.edu< +%% % -/tx@3DPlotDict 50 dict def +/tx@3DPlotDict 200 dict def tx@3DPlotDict begin % /printDot { gsave 2 copy 2 0 360 arc fill stroke grestore } def % /saveCoor { - dzUnit mul /z exch def - dyUnit mul /y exch def - dxUnit mul /x exch def + dzUnit mul /z ED + dyUnit mul /y ED + dxUnit mul /x ED } def % /ConvertTo2D { RotatePoint - 1 { % dummy loop, will run only 1 time + 1 { % dummy loop, will run only 1 time, allows exit coorType 0 le { % the default | /x2D x leftHanded not { neg } if Alpha cos mul y Alpha sin mul add def % /\ co system /y2D x leftHanded { neg } if Alpha sin mul y Alpha cos mul add neg Beta sin mul z Beta cos mul add def @@ -43,6 +45,10 @@ tx@3DPlotDict begin /x2D y x 0.5 mul sub def /y2D z x 0.5 mul sub def exit } if + coorType 3 le { % coorType |/_ with a 1/sqrt(2) shortend x-axis and 135 degrees + /x2D y x -0.5 mul sub def + /y2D z x -0.5 mul sub def + exit } if } repeat } def % @@ -75,7 +81,7 @@ tx@3DPlotDict begin % /convertStackTo2D { counttomark - /n exch def /n3 n 3 div cvi def + /n ED /n3 n 3 div cvi def n3 { n -3 roll SphericalCoor { ConvertToCartesian } { saveCoor } ifelse @@ -85,43 +91,181 @@ tx@3DPlotDict begin } repeat } def % +/RotSet (set ) def +% +/eulerRotation false def +% Matrix multiplication procedure +/matmul { + + /M@tMulDict 20 dict def + M@tMulDict begin + /m2 ED + /m1 ED + m1 dup length 2 sub 2 getinterval aload pop + /col1max ED + /row1max ED + m2 dup length 2 sub 2 getinterval aload pop + /col2max ED + /row2max ED + /m3 row1max col2max mul 2 add array def + m3 dup length 2 sub row1max col2max 2 array astore putinterval + 0 1 row1max 1 sub { + /row ED + 0 1 col2max 1 sub { + /col ED + /sum 0 def + 0 1 col1max 1 sub{ + /rowcol ED + sum + m1 row col1max mul rowcol add get + m2 rowcol col2max mul col add get + mul add + /sum ED + } for + m3 row col2max mul col add sum put + } for + } for + m3 + end % end of M@tMulDict + +} def +% +/SetMQuaternion { + + /MnewTOold 11 array def + + /Qu@ternionDict 30 dict def + Qu@ternionDict begin + + /normRotVec xRotVec yRotVec zRotVec 3 array astore VecNorm def + normRotVec 0 gt + {/xRotVecNorm xRotVec normRotVec div def + /yRotVecNorm yRotVec normRotVec div def + /zRotVecNorm zRotVec normRotVec div def + RotAngle} + {/xRotVecNorm 1 def + /yRotVecNorm 0 def + /zRotVecNorm 0 def + 0} ifelse + + 2 div dup + /q0 exch cos def + sin dup dup + /q1 exch xRotVecNorm mul def + /q2 exch yRotVecNorm mul def + /q3 exch zRotVecNorm mul def + + /q0q0 q0 q0 mul def + /q0q1 q0 q1 mul def + /q0q2 q0 q2 mul def + /q0q3 q0 q3 mul def + + /q1q1 q1 q1 mul def + /q1q2 q1 q2 mul def + /q1q3 q1 q3 mul def + + /q2q2 q2 q2 mul def + /q2q3 q2 q3 mul def + + /q3q3 q3 q3 mul def + + MnewTOold 0 q0q0 q1q1 add q2q2 sub q3q3 sub put + MnewTOold 1 q1q2 q0q3 sub 2 mul put + MnewTOold 2 q1q3 q0q2 add 2 mul put + + MnewTOold 3 q1q2 q0q3 add 2 mul put + MnewTOold 4 q0q0 q1q1 sub q2q2 add q3q3 sub put + MnewTOold 5 q2q3 q0q1 sub 2 mul put + + MnewTOold 6 q1q3 q0q2 sub 2 mul put + MnewTOold 7 q2q3 q0q1 add 2 mul put + MnewTOold 8 q0q0 q1q1 sub q2q2 sub q3q3 add put + + MnewTOold 9 3 put + MnewTOold 10 3 put + + end % end of Qu@ternionDict + +} def +% +/SetMxyz { + + 1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 3 3 11 array astore /MnewTOold ED + RotSequence cvx exec % Now create a new MnewTOold using xyz, etc. + +} def % -/CalcCoordinates {% from pst-vue3d - formulesTroisD - Xi 28.45 mul Yi 28.45 mul +/ConcatMQuaternion { + + MnewTOold % Push onto stack + SetMQuaternion % Uses [xyz]RotVec and RotAngle to make MnewToOld + MnewTOold matmul /MnewTOold ED + +} def +% +/ConcatMxyz { + + MnewTOold % Push onto stack + SetMxyz % Uses RotX, etc. to set MnewTOold + MnewTOold matmul /MnewTOold ED + } def -% pour la 3D conventionnelle -/formulesTroisD{% - /xObservateur x Sin1 mul neg y Cos1 mul add def - /yObservateur x Cos1Sin2 mul neg y Sin1Sin2 mul sub z Cos2 mul add def - /zObservateur x neg Cos1Cos2 mul y Sin1Cos2 mul sub z Sin2 mul sub def - /Xi xObservateur zObservateur Div def - /Yi yObservateur zObservateur Div def +% +/RotatePoint{ + MnewTOold x y z 3 1 5 array astore matmul + 0 3 getinterval aload pop + /z ED + /y ED + /x ED } def % -/RotatePointXYZ{% Mxx are defined in the TeX file - /xi M11 x mul M12 y mul add M13 z mul add def - /yi M21 x mul M22 y mul add M23 z mul add def - /zi M31 x mul M32 y mul add M33 z mul add def - /x xi def - /y yi def - /z zi def +/makeMoldTOnew { + /MoldTOnew 11 array def + MoldTOnew 0 MnewTOold 0 get put + MoldTOnew 1 MnewTOold 3 get put + MoldTOnew 2 MnewTOold 6 get put + MoldTOnew 3 MnewTOold 1 get put + MoldTOnew 4 MnewTOold 4 get put + MoldTOnew 5 MnewTOold 7 get put + MoldTOnew 6 MnewTOold 2 get put + MoldTOnew 7 MnewTOold 5 get put + MoldTOnew 8 MnewTOold 8 get put + MoldTOnew 9 3 put + MoldTOnew 10 3 put } def % /RotXaxis { - /yTemp y RotX cos mul z RotX sin mul sub def - /z y RotX sin mul z RotX cos mul add def - /y yTemp def + eulerRotation + {1 0 0} + {makeMoldTOnew MoldTOnew 1 0 0 3 1 5 array astore matmul + 0 3 getinterval aload pop} ifelse + /zRotVec ED + /yRotVec ED + /xRotVec ED + /RotAngle RotX def + ConcatMQuaternion } def /RotYaxis { - /xTemp x RotY cos mul z RotY sin mul add def - /z x RotY sin mul neg z RotY cos mul add def - /x xTemp def + eulerRotation + {0 1 0} + {makeMoldTOnew MoldTOnew 0 1 0 3 1 5 array astore matmul + 0 3 getinterval aload pop} ifelse + /zRotVec ED + /yRotVec ED + /xRotVec ED + /RotAngle RotY def + ConcatMQuaternion } def /RotZaxis { - /xTemp x RotZ cos mul y RotZ sin mul sub def - /y x RotZ sin mul y RotZ cos mul add def - /x xTemp def + eulerRotation + {0 0 1} + {makeMoldTOnew MoldTOnew 0 0 1 3 1 5 array astore matmul + 0 3 getinterval aload pop} ifelse + /zRotVec ED + /yRotVec ED + /xRotVec ED + /RotAngle RotZ def + ConcatMQuaternion } def /xyz { RotXaxis RotYaxis RotZaxis } def /yxz { RotYaxis RotXaxis RotZaxis } def @@ -129,13 +273,13 @@ tx@3DPlotDict begin /xzy { RotXaxis RotZaxis RotYaxis } def /zxy { RotZaxis RotXaxis RotYaxis } def /zyx { RotZaxis RotYaxis RotXaxis } def -% -/RotatePoint { RotSequence cvx exec } def +/quaternion { } def % Null % /VecNorm { 0 exch { dup mul add } forall sqrt } def % /UnitVec { % on stack is [a]; returns a vector with [a][a]/|a|=1 dup VecNorm /norm ED + norm 0 lt {/norm 0 def} if { norm div } forall 3 array astore } def % /AxB { % on the stack are the two vectors [a][b] @@ -169,10 +313,10 @@ tx@3DPlotDict begin % les rayons de lumière xLight dup mul yLight dup mul zLight dup mul add add sqrt /NormeLight ED % the color values - /K exch def - /Yellow exch def - /Magenta exch def - /Cyan exch def + /K ED + /Yellow ED + /Magenta ED + /Cyan ED } def % /facetteSphere { @@ -182,28 +326,28 @@ tx@3DPlotDict begin /Zpoint Rsphere phi sin mul CZ add def Xpoint Ypoint Zpoint tx@ProjThreeD moveto theta 1 theta increment add {% - /theta1 exch def + /theta1 ED /Xpoint Rsphere theta1 cos mul phi cos mul CX add def /Ypoint Rsphere theta1 sin mul phi cos mul CY add def /Zpoint Rsphere phi sin mul CZ add def Xpoint Ypoint Zpoint tx@ProjThreeD lineto } for phi 1 phi increment add { - /phi1 exch def + /phi1 ED /Xpoint Rsphere theta increment add cos mul phi1 cos mul CX add def /Ypoint Rsphere theta increment add sin mul phi1 cos mul CY add def /Zpoint Rsphere phi1 sin mul CZ add def Xpoint Ypoint Zpoint tx@ProjThreeD lineto } for theta increment add -1 theta {% - /theta1 exch def + /theta1 ED /Xpoint Rsphere theta1 cos mul phi increment add cos mul CX add def /Ypoint Rsphere theta1 sin mul phi increment add cos mul CY add def /Zpoint Rsphere phi increment add sin mul CZ add def Xpoint Ypoint Zpoint tx@ProjThreeD lineto } for phi increment add -1 phi { - /phi1 exch def + /phi1 ED /Xpoint Rsphere theta cos mul phi1 cos mul CX add def /Ypoint Rsphere theta sin mul phi1 cos mul CY add def /Zpoint Rsphere phi1 sin mul CZ add def @@ -215,17 +359,17 @@ tx@3DPlotDict begin /MaillageSphere { % on stack must be x y z Radius increment C M Y K setColorLight - /increment exch def - /Rsphere exch def - /CZ exch def - /CY exch def - /CX exch def + /increment ED + /Rsphere ED + /CZ ED + /CY ED + /CX ED /StartTheta 0 def /condition { PSfacetteSphere 0 ge } def -90 increment 90 increment sub {% - /phi exch def + /phi ED StartTheta increment 360 StartTheta add increment sub {% - /theta exch def + /theta ED % Centre de la facette /Xpoint Rsphere theta increment 2 div add cos mul phi increment 2 div add cos mul CX add def /Ypoint Rsphere theta increment 2 div add sin mul phi increment 2 div add cos mul CY add def @@ -267,7 +411,7 @@ tx@3DPlotDict begin /PlanCoupeCylinder { % /TableauxPoints [ 0 1 359 { - /phi exch def + /phi ED [ Radius phi Height ConvCyl2d ] % on décrit le cercle } for ] def @@ -374,7 +518,7 @@ tx@3DPlotDict begin /height ED /radius ED startAngle increment endAngle { - /Angle exch def + /Angle ED radius Angle 0 ConvCylToCartesian MoveTo radius Angle height ConvCylToCartesian LineTo } for @@ -494,13 +638,13 @@ tx@3DPlotDict begin /V {Z sqrt} bind def /TableauxPoints [ 0 1 359 { - /U exch def [ U U Z V calculate2DPoint ] % on décrit le cercle + /U ED [ U U Z V calculate2DPoint ] % on décrit le cercle } for ] def newpath TableauxPoints 0 get aload pop moveto 0 1 359 { - /compteur exch def + /compteur ED TableauxPoints compteur get aload pop lineto } for closepath @@ -510,20 +654,20 @@ tx@3DPlotDict begin newpath U U Z V calculate2DPoint moveto U 1 U increment add {% - /U1 exch def + /U1 ED U1 U1 Z V calculate2DPoint lineto } for Z pas10 Z pas add pas10 add{ - /Z1 exch def + /Z1 ED /V {Z1 sqrt} bind def U1 U1 Z1 V calculate2DPoint lineto } for U increment add -1 U {% - /U2 exch def + /U2 ED U2 U2 Z pas add V calculate2DPoint lineto } for Z pas add pas10 sub pas10 neg Z pas10 sub { - /Z2 exch def + /Z2 ED /V Z2 abs sqrt def U U Z2 V calculate2DPoint lineto } for @@ -539,7 +683,7 @@ tx@3DPlotDict begin /Z ED /V Z sqrt def 0 increment 360 increment sub {% - /U exch def + /U ED % Centre de la facette /Ucentre U increment 2 div add def /Vcentre Z pas 2 div add sqrt def @@ -576,5 +720,122 @@ tx@3DPlotDict begin } for } def % +% ------------------------------------ math stuff ---------------------------------- +% +% Matrix A in arrays of rows A[[row1][row2]...] +% with [row1]=[a11 a12 ... b1] +% returns on stack solution vector X=[x1 x2 ... xn] +/SolveLinEqSystem { % on stack matrix M=[A,b] (A*x=b) + 10 dict begin % hold all ocal + /A exch def + /Rows A length def % Rows = number of rows + /Cols A 0 get length def % Cols = number of columns + /Index [ 0 1 Rows 1 sub { } for ] def % Index = [0 1 2 ... Rows-1] + /col 0 def + /row 0 def + /PR Rows array def % PR[c] = pivot row for row row + { % starts the loop, find pivot entry in row r + col Cols ge row Rows ge or { exit } if % col < Cols and row < Rows else exit + /pRow row def % pRow = pivot row + /max A row get col get abs def % get A[row[col]], first A[0,0] + row 1 add 1 Rows 1 sub { % starts for loop 1 1 Rows-1 + /j exch def % index counter + /x A j get col get abs def % get A[j[r]] + x max gt { % x>max, then save position + /pRow j def + /max x def + } if + } for % now we have the row with biggest A[0,1] + % with pRow = the pivot row + max 0 gt { % swap entries pRow and row in i + /tmp Index row get def + Index row Index pRow get put + Index pRow tmp put % and columns pRow and row in A + /tmp A row get def + A row A pRow get put + A pRow tmp put % pivot + /row0 A row get def % the pivoting row + /p0 row0 col get def % the pivot value + row 1 add 1 Rows 1 sub { % start for loop + /j exch def + /c1 A j get def + /p c1 col get p0 div def + c1 col p put % subtract (p1/p0)*row[i] from row[j] + col 1 add 1 Cols 1 sub { % start for loop + /i exch def + c1 dup i exch % c1 i c1 + i get row0 i get p mul sub put + } for + } for + PR row col put + /col col 1 add def + /row row 1 add def + }{ % all zero entries + /row row 1 add def % continue loop with same row + } ifelse + } loop + /X A def % solution vector + A Rows 1 sub get dup + Cols 1 sub get exch + Cols 2 sub get div + X Rows 1 sub 3 -1 roll put % X[n] + Rows 2 sub -1 0 { % for loop to calculate X[i] + /xi exch def % current index + A xi get % i-th row + /Axi exch def + /sum 0 def + Cols 2 sub -1 xi 1 add { + /n exch def + /sum sum Axi n get X n get mul add def + } for + Axi Cols 1 sub get % b=Axi[Cols-1] + sum sub % b-sum + Axi xi get div % b-sum / Axi[xi] + X xi 3 -1 roll put % X[xi] + } for + X + end +} def % -end +% u v -> u+v +/vector-add { 1 dict begin + /v exch def + [ exch + 0 % u i + exch { % i u[i] + v % i u[i] v + 2 index get add % i u[i]+v[i] + exch 1 add % i + } forall + pop + ] + end +} def + +% u v -> u-v +/vector-sub { 1 dict begin + /v exch def + [ exch + 0 % u i + exch { % i u[i] + v % i u[i] v + 2 index get sub % i u[i]+v[i] + exch 1 add % i + } forall + pop + ] +end } def +% +% [v] c -> [c.v] +/vector-scale { 1 dict begin + /c exch def + [ exch + { % s i u[i] + c mul % s i u[i] v + } forall + ] + end } def +% +% +end % tx@3DPlotDict + diff --git a/Master/texmf-dist/source/generic/pst-3dplot/Makefile b/Master/texmf-dist/source/generic/pst-3dplot/Makefile new file mode 100644 index 00000000000..294bb21f319 --- /dev/null +++ b/Master/texmf-dist/source/generic/pst-3dplot/Makefile @@ -0,0 +1,48 @@ + +# `Makefile' for `pst-3dplot.pdf', hv, 2007/03/17 + +.SUFFIXES : .tex .ltx .dvi .ps .pdf .eps + +PACKAGE = pst-3dplot + +MAIN = $(PACKAGE)-doc + +LATEX = latex + +ARCHNAME = $(MAIN)-$(shell date +%y%m%d) + +ARCHFILES = $(PACKAGE).sty $(PACKAGE).tex $(PACKAGE).pro $(MAIN).tex README Changes Makefile + +all : doc clean +doc: $(MAIN).pdf + +$(MAIN).pdf : $(MAIN).ps + GS_OPTIONS=-dAutoRotatePages=/None ps2pdf $< + +$(MAIN).ps : $(MAIN).dvi + dvips $< + +$(MAIN).dvi : $(MAIN).tex + $(LATEX) $< + $(LATEX) $< + if ! test -f $(basename $<).glo ; then touch $(basename $<).glo; fi + if ! test -f $(basename $<).idx ; then touch $(basename $<).idx; fi + makeindex -s gglo.ist -t $(basename $<).glg -o $(basename $<).gls \ + $(basename $<).glo + makeindex -t $(basename $<).ilg -o $(basename $<).ind \ + $(basename $<).idx + bibtex $(basename $<) + $(LATEX) $< + $(LATEX) $< + +clean : + $(RM) $(addprefix $(MAIN), .log .aux .glg .glo .gls .ilg .idx .ind .tmp .toc .out .blg .Roessler .bbl ) + $(RM) $(addprefix $(MAIN), .dvi .ps) + +veryclean : clean + $(RM) $(addprefix $(MAIN), .pdf .bbl .blg) + +arch : + zip $(ARCHNAME).zip $(ARCHFILES) + +# EOF diff --git a/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex b/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex index e28d3c0564f..8669b0e7433 100644 --- a/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex +++ b/Master/texmf-dist/tex/generic/pst-3dplot/pst-3dplot.tex @@ -6,6 +6,7 @@ %% Package `pst-3dplot.tex' %% %% Herbert Voss <voss _at_ perce.de> +%% with contributions of Darrell Lamm <darrell.lamm _at_ gtri.gatech.edu< %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives @@ -25,9 +26,9 @@ \ifx\PSTricksAddLoaded\endinput\else\input pstricks-add.tex\fi \ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi % -\def\fileversion{1.77} -\def\filedate{2007/10/03} -\message{`PST-3dplot' v\fileversion, \filedate\space (HV)} +\def\fileversion{1.78} +\def\filedate{2007/12/22} +\message{`PST-3dplot' v\fileversion, \filedate\space (HV,DL)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax \ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi @@ -60,6 +61,7 @@ % % ---------------- the if's ----------------- % +\define@boolkey[psset]{pst-3dplot}[Pst@]{Debug}[true]{}% \define@boolkey[psset]{pst-3dplot}[Pst@]{drawing}[true]{}% draw the coordinates? \define@boolkey[psset]{pst-3dplot}[Pst@]{drawCoor}[true]{}% draw the coordinates of a dot? \define@boolkey[psset]{pst-3dplot}[Pst@]{hiddenLine}[true]{}% emulate hidden line surface? @@ -68,21 +70,24 @@ \define@boolkey[psset]{pst-3dplot}[Pst@]{CylindricalCoor}[true]{}% (r,phi,z) % \Pst@SphericalCoorfalse}% \define@boolkey[psset]{pst-3dplot}[Pst@]{leftHanded}[true]{}% left-Handed coor +\define@boolkey[psset]{pst-3dplot}[Pst@]{eulerRotation}[true]{}% Use Euler rotation definition \define@key[psset]{pst-3dplot}{coorType}{% \pst@getint{#1}\psk@ThreeDplot@coorType \ifcase\psk@ThreeDplot@coorType % 0 is the default \or % \def\psk@ThreeDplot@Beta{0} - \or + \or %2 \def\psk@ThreeDplot@Alpha{135} % \def\psk@ThreeDplot@Beta{0} + \or %3 + \def\psk@ThreeDplot@Alpha{45} \fi} % 0 default % 1 z y are orthogonal and angle x|y is Alpha, Beta has no meaning % 1 z y are orthogonal and angle Alpha is always 135, x-axis shortened by 1/sqrt(2), Beta has no meaning \psset[pst-3dplot]{drawing,drawCoor,hiddenLine=false,SphericalCoor=false, - leftHanded=false,coorType=0} + leftHanded=false,eulerRotation=false,coorType=0} % % ------- the global definitions for the pspicture frame ------ % @@ -95,6 +100,9 @@ \define@key[psset]{pst-3dplot}{xThreeDunit}{\pst@checknum{#1}\psk@ThreeDplot@xThreeDunit } \define@key[psset]{pst-3dplot}{yThreeDunit}{\pst@checknum{#1}\psk@ThreeDplot@yThreeDunit } \define@key[psset]{pst-3dplot}{zThreeDunit}{\pst@checknum{#1}\psk@ThreeDplot@zThreeDunit } +\define@key[psset]{pst-3dplot}{xRotVec}{\pst@checknum{#1}\psk@ThreeDplot@xRotVec } % Rotation vector x +\define@key[psset]{pst-3dplot}{yRotVec}{\pst@checknum{#1}\psk@ThreeDplot@yRotVec } % Rotation vector y +\define@key[psset]{pst-3dplot}{zRotVec}{\pst@checknum{#1}\psk@ThreeDplot@zRotVec } % Rotation vector z \define@key[psset]{pst-3dplot}{deltax}{\pst@checknum{#1}\psk@ThreeDplot@deltax } \define@key[psset]{pst-3dplot}{deltay}{\pst@checknum{#1}\psk@ThreeDplot@deltay } \define@key[psset]{pst-3dplot}{deltaz}{\pst@checknum{#1}\psk@ThreeDplot@deltaz } @@ -108,8 +116,11 @@ \define@key[psset]{pst-3dplot}{Beta}{\pst@getangle{#1}\psk@ThreeDplot@Beta }% Vertical turn \define@key[psset]{pst-3dplot}{RotX}{\pst@getangle{#1}\psk@ThreeD@RotX }% x rotation \define@key[psset]{pst-3dplot}{RotY}{\pst@getangle{#1}\psk@ThreeD@RotY }% y rotation -\define@key[psset]{pst-3dplot}{RotZ}{\pst@getangle{#1}\psk@ThreeD@RotZ }% z +\define@key[psset]{pst-3dplot}{RotZ}{\pst@getangle{#1}\psk@ThreeD@RotZ }% z rotation +\define@key[psset]{pst-3dplot}{RotAngle}{\pst@getangle{#1}\psk@ThreeD@RotAngle }% General rotation angle \define@key[psset]{pst-3dplot}{RotSequence}{\def\psk@ThreeD@RotS{#1 }}% +% Set or Concat +\define@key[psset]{pst-3dplot}{RotSet}{\def\psk@ThreeD@RotSet{#1 }}% \define@key[psset]{pst-3dplot}{PlaneSequence}{\def\psk@ThreeD@PlaneSequence{#1 }}% \define@key[psset]{pst-3dplot}{zCoor}{\pst@checknum{#1}\psk@ThreeDplot@zCoor } \psset[pst-3dplot]{zCoor=0} @@ -235,10 +246,14 @@ % \def\setIIIDplotDefaults{% \psset[pst-3dplot]{ - drawing=true,hiddenLine=false,xMin=-1,xMax=4,yMin=-1,yMax=4,zMin=-1,zMax=4, + Debug=false, + drawing=true,hiddenLine=false,eulerRotation=false, + xMin=-1,xMax=4,yMin=-1,yMax=4,zMin=-1,zMax=4, xThreeDunit=1.0,yThreeDunit=1.0,zThreeDunit=1.0,Alpha=45,Beta=30, deltax=1,deltay=1,deltaz=1,Deltax=1,Deltay=1,Deltaz=1, - RotX=0,RotY=0,RotZ=0,RotSequence=xyz,PlaneSequence={}, + RotX=0,RotY=0,RotZ=0,RotSequence=xyz,RotSet=set, + xRotVec=1,yRotVec=0,zRotVec=0,RotAngle=0, + PlaneSequence={}, drawStyle=xLines,xPlotpoints=25,yPlotpoints=25,beginAngle=0,endAngle=360, linejoin=1,XO=0,YO=0,angleStep=1,posStart=0,length=2,arrowOffset=0, visibleLineStyle=solid,invisibleLineStyle=dashed,nameX=$x$,spotX=180, @@ -259,10 +274,15 @@ /RotX \psk@ThreeD@RotX\space def /RotY \psk@ThreeD@RotY\space def /RotZ \psk@ThreeD@RotZ\space def + /RotAngle \psk@ThreeD@RotAngle\space def + /xRotVec \psk@ThreeDplot@xRotVec\space def + /yRotVec \psk@ThreeDplot@yRotVec\space def + /zRotVec \psk@ThreeDplot@zRotVec\space def /dxUnit \psk@ThreeDplot@xThreeDunit\space def /dyUnit \psk@ThreeDplot@yThreeDunit\space def /dzUnit \psk@ThreeDplot@zThreeDunit\space def /RotSequence (\psk@ThreeD@RotS) def + /RotSet (\psk@ThreeD@RotSet) def /Alpha \psk@ThreeDplot@Alpha\space def /Beta \psk@ThreeDplot@Beta\space def /Sin1 Beta sin def @@ -273,15 +293,18 @@ /Sin1Sin2 Sin1 Sin2 mul def /Cos1Cos2 Cos1 Cos2 mul def /Sin1Cos2 Sin1 Cos2 mul def - /M11 RotZ cos RotY cos mul def - /M12 RotZ cos RotY sin mul RotX sin mul RotZ sin RotX cos mul sub def - /M13 RotZ cos RotY sin mul RotX cos mul RotZ sin RotX sin mul add def - /M21 RotZ sin RotY cos mul def - /M22 RotZ sin RotY sin RotX sin mul mul RotZ cos RotX cos mul add def - /M23 RotZ sin RotY sin mul RotX cos mul RotZ cos RotX sin mul sub def - /M31 RotY sin neg def - /M32 RotX sin RotY cos mul def - /M33 RotX cos RotY cos mul def + currentdict tx@3DPlotDict ne dup + {tx@3DPlotDict begin} if % Begin the correct dict if necessary + /eulerRotation \ifPst@eulerRotation true \else false \fi def + RotSet (set ) eq currentdict /MnewTOold known not or + {/PROCMXYZ /SetMxyz def /PROCMQUATERNION /SetMQuaternion def} + {RotSet (concat ) eq + {/PROCMXYZ /ConcatMxyz def /PROCMQUATERNION /ConcatMQuaternion def} + {/PROCMXYZ () def /PROCMQUATERNION () def} ifelse + } ifelse + RotSequence (quaternion ) ne {PROCMXYZ} {PROCMQUATERNION} ifelse cvx exec + /RotSet (keep ) def + {end} if % End the correct dict if necessary /leftHanded \ifPst@leftHanded true \else false \fi def /coorType \psk@ThreeDplot@coorType\space def \psk@ThreeDplot@xyzLight\space @@ -331,6 +354,7 @@ \addbefore@par{linewidth=0.5pt,linecolor=red,arrows=->,dotstyle=|}% \use@par% \pstThreeDNode(\psk@ThreeDplot@xMin,0,0){xMin}% + \psset[pst-3dplot]{RotSet=keep}% Keep the current rotation matrix \pstThreeDNode(\psk@ThreeDplot@xMax,0,0){xMax}% \pstThreeDNode(0,\psk@ThreeDplot@yMin,0){yMin}% \pstThreeDNode(0,\psk@ThreeDplot@yMax,0){yMax}% @@ -510,6 +534,7 @@ \addto@pscode{% \pst@3ddict \variablesIIID + \psk@ThreeDplot@linejoin setlinejoin /dxUnit \psk@ThreeDplot@xThreeDunit\space def /dyUnit \psk@ThreeDplot@yThreeDunit\space def /dzUnit \psk@ThreeDplot@zThreeDunit\space def @@ -540,6 +565,7 @@ \addto@pscode{ \pst@3ddict \variablesIIID + \psk@ThreeDplot@linejoin setlinejoin \pst@tempThreeDDot \ifPst@SphericalCoor ConvertToCartesian @@ -684,6 +710,7 @@ \addto@pscode{% \pst@3ddict \variablesIIID + \psk@ThreeDplot@linejoin setlinejoin /P1 { \pst@tempAA } def % x y z or Radius longitude lattitude /P2 { \pst@tempBB } def % /P3 { \pst@tempCC } def % @@ -747,6 +774,7 @@ \addto@pscode{% \pst@3ddict \variablesIIID + \psk@ThreeDplot@linejoin setlinejoin /P1 { \pst@tempAA } def % x y z or Radius longitude lattitude /P2 { \pst@tempBB } def % /P3 { \pst@tempCC } def % @@ -843,6 +871,7 @@ \getThreeDCoor{#3}\pst@tempB% b \addto@pscode{% \pst@3ddict \variablesIIID end + \psk@ThreeDplot@linejoin setlinejoin \ifPst@SphericalCoor \pst@tempC\space \tx@ConvertToCartesian /zM \tx@Z def /yM \tx@Y def /xM \tx@X def % center @@ -918,6 +947,7 @@ \addto@pscode{ \pst@3ddict \variablesIIID + \psk@ThreeDplot@linejoin setlinejoin /xUnit { \pst@number\psxunit\space mul } def /yUnit { \pst@number\psyunit\space mul } def /SphericalCoor \ifPst@SphericalCoor true \else false \fi def % @@ -979,7 +1009,7 @@ 3 1 roll \psk@ThreeDplot@Alpha\space cos add 3 1 roll \psk@ThreeDplot@Alpha\space sin add 3 1 roll - \or + \else 3 1 roll 45 cos add 3 1 roll 45 sin add 3 1 roll \fi } def @@ -1029,6 +1059,7 @@ \begin@SpecialObj% \use@par \addto@pscode{% + \psk@ThreeDplot@linejoin setlinejoin /viewpoint {% to make it compatible with parallel projection \psk@viewpoint \ifcase\psk@ThreeDplot@coorType @@ -1039,7 +1070,7 @@ 3 1 roll \psk@ThreeDplot@Alpha\space cos add 3 1 roll \psk@ThreeDplot@Alpha\space sin add 3 1 roll - \or + \else 3 1 roll 45 cos add 3 1 roll 45 sin add 3 1 roll \fi } def @@ -1065,6 +1096,7 @@ \begin@ClosedObj \addto@pscode{% \pst@3ddict \variablesIIID end + \psk@ThreeDplot@linejoin setlinejoin /POrig { #1 #2 #3 \ifPst@CylindricalCoor \tx@ConvCylToCartesian \fi \pst@number\psunit mul 3 1 roll @@ -1082,6 +1114,7 @@ \begin@SpecialObj \addto@pscode{% \pst@3ddict \variablesIIID end + \psk@ThreeDplot@linejoin setlinejoin /POrig { #1 #2 #3 \ifPst@CylindricalCoor \tx@ConvCylToCartesian \fi \pst@number\psunit mul 3 1 roll @@ -1102,6 +1135,7 @@ \begin@ClosedObj \addto@pscode{% \pst@3ddict \variablesIIID end + \psk@ThreeDplot@linejoin setlinejoin /POrig { #1 #2 #3 #5 add \ifPst@CylindricalCoor \tx@ConvCylToCartesian \fi \pst@number\psunit mul 3 1 roll @@ -1138,7 +1172,7 @@ 3 1 roll \psk@ThreeDplot@Alpha\space cos add 3 1 roll \psk@ThreeDplot@Alpha\space sin add 3 1 roll - \or + \else 3 1 roll 45 cos add 3 1 roll 45 sin add 3 1 roll \fi } def @@ -1200,7 +1234,7 @@ 3 1 roll \psk@ThreeDplot@Alpha\space cos add 3 1 roll \psk@ThreeDplot@Alpha\space sin add 3 1 roll - \or + \else 3 1 roll 45 cos add 3 1 roll 45 sin add 3 1 roll \fi } def @@ -1458,11 +1492,14 @@ } \def\parametricPlotThreeD@ii(#1,#2)(#3,#4)#5{{% \pst@killglue% + \pst@dima=#3pt\pst@dimb=#4pt % #3=#4, then we have a 3d line + \ifdim\pst@dima=\pst@dimb\psset{yPlotpoints=1}\fi% and set yPlotpoints=1 \use@par% \@pstfalse% \@nameuse{beginplot@\psplotstyle}% \@nameuse{testqp@\psplotstyle}% quick plot or something special \if@pst% + \ifPst@Debug\typeout{===>Quick plot}\fi \def\pslinetype{0}% \addto@pscode{% \variablesIIID @@ -1483,10 +1520,9 @@ }% \parametricPlotThreeD@iii% \else% - \def\pslinetype{-3}% + \ifPst@Debug\typeout{===>Special plot}\fi + \def\pslinetype{0}% \endgroup% - \pst@dima=#3pt\pst@dimb=#4pt - \ifdim\pst@dima=\pst@dimb\psset{yPlotpoints=1}\fi% #3=#4 ?? \multido{\n@Y=0+1}{\psk@ThreeDplot@yPlotpoints}{% \@nameuse{beginplot@\psplotstyle}% \addto@pscode{% @@ -1513,13 +1549,15 @@ % \def\parametricPlotThreeD@iii{% without arrows (quickplot) \addto@pscode{% - \psk@ThreeDplot@yPlotpoints\space { + \psk@ThreeDplot@yPlotpoints { /t tMin def xyz \@nameuse{beginqp@\psplotstyle} - \psk@ThreeDplot@xPlotpoints { + /t t dt add def + \psk@ThreeDplot@xPlotpoints\space 1 sub { xyz \@nameuse{doqp@\psplotstyle} /t t dt add def } repeat + /t t dt sub def /u u du add def } repeat }% diff --git a/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty b/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty index 23c451d5d20..8412e97f3b3 100644 --- a/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty +++ b/Master/texmf-dist/tex/latex/pst-3dplot/pst-3dplot.sty @@ -2,7 +2,10 @@ \ProvidesPackage{pst-3dplot}[2006/02/07 package wrapper for pst-3dplot.tex (hv)] \input{pst-3dplot.tex} -\IfFileExists{pst-3dplot.pro}{\@addtofilelist{pst-3dplot.pro}}{}% +\IfFileExists{pst-3dplot.pro}{% + \ProvidesFile{pst-3dplot.pro} + [2007/12/22 v. 0.24, PostScript prologue file (hv)] + \@addtofilelist{pst-3dplot.pro}}{}% \ProvidesFile{pst-3dplot.tex} [\filedate\space v\fileversion\space `PST-3dplot' (hv)] \endinput |