[pstricks] 3D-Coordinate-System

Markus Krebs markuskrebs at web.de
Fri Aug 17 16:37:33 CEST 2007


Hello Herbert!

The experimental code is working. I've tried with some examples.

The x-axis is not drawn correctly.

/ConvertTo2D {
   RotatePoint
   coorType 1 eq {
     /x2D -0.5 x mul y add def  %  |/_  co system              % modified MK
%   /x2D y x Alpha 90 sub sin mul sub def  %  |/_  co system      % HV
     /y2D -0.5 x mul z add 
def                                        % modified MK
%/y2D z x Alpha 90 sub cos mul sub def                                     % HV
   }{ 
%  |

I've changed these two lines of pst-3dplot.pro and the result is 
fine. x_1-axis shortened by 1/2*sqrt(2). But I don't know very much 
of postscript.

Minimal example:

\documentclass{article} % ,titlepage
\usepackage[svgnames,dvipsnames]{pstricks}
\usepackage{pst-3dplot,pstricks-add}
\psset{IIIDxTicksPlane=yz}
\begin{document}
\makeatletter
                 \def\psxyzlabel#1{\tiny\expandafter\@stripDecimals#1..\@nil}
\makeatother
\begin{center}
\psset{unit=1,plotpoints=2000,coorType=1,Alpha=135}
\begin{pspicture}(-6,-4)(9,8)
\psgrid[subgriddiv=2,gridcolor=lightgray,subgridcolor=lightgray,gridlabels=0pt]
\pstThreeDCoor[,xMin=0,yMin=0,zMin=0,xMax=8,yMax=8,zMax=8,nameX=$x_1$,nameY=$x_2$,nameZ=$x_3$,IIIDticks=true]
\psset{linewidth=0.25pt,linecolor=gray}
\pstThreeDLine[linecolor=blue,arrows=->,linewidth=2.5pt](0,0,0)(1,0,0)

%\pstThreeDPlaneGrid[subticks=7](0,0)(7,7)
%\pstThreeDPlaneGrid[subticks=7,planeGrid=xz](0,0)(7,7)
%\pstThreeDPlaneGrid[subticks=7,planeGrid=yz](0,0)(7,7)
\pstThreeDBox[linejoin=2,linecolor=blue,linewidth=1pt,linejoin=2](0,0,0)(5,0,0)(0,4,0)(0,0,6)
\pstThreeDDot[linecolor=red,linewidth=3pt](5,4,6)
\pstThreeDLine[linecolor=DarkGreen,linewidth=1.25pt,arrowsize=8pt]{->}(0,0,0)(5,0,0)
\pstThreeDLine[linecolor=DarkGreen,linewidth=1.25pt,arrowsize=8pt]{->}(5,0,0)(5,4,0)
\pstThreeDLine[linecolor=DarkGreen,linewidth=1.25pt,arrowsize=8pt]{->}(5,4,0)(5,4,6)
\pstThreeDPut[](5,4,6.5){Q}
\pstThreeDPut[](10,5,.5){\textcolor{DarkGreen}{\begin{tabular}{c} 
Koordinatenzug \\ von \\ Q \end{tabular}}}
\pstThreeDPut[](0,7,8.5){\textcolor{blue}{\begin{tabular}{c} 
Koordinaten- \\quader von Q \end{tabular}}}
\end{pspicture}
\end{center}
\end{document}

Thank's a lot for these new possibilities.

Markus





At 00:00 16.08.2007, you wrote:
>Markus Krebs wrote:
> > Is something like this (see example) possible with pst-3dplot?
> >
> > A 3D-Coordinate System with an angle of 135 degrees between x_2 and
> > x_1, shortened with factor 1/2 * sqrt(2).
> >
>try the
>http://perce.de/LaTeX/pst-3dplot/pst-3dplot.tex
>http://perce.de/LaTeX/pst-3dplot/pst-3dplot.pro
>
>it has the experimental feature coorType. With
>\psset{coorType=1,Alpha=135}
>you should be able to get what you want. But do not expect,
>that every macro works in the same way ...
>
>Herbert
>
>
>_______________________________________________
>pstricks mailing list
>pstricks at tug.org
>http://tug.org/mailman/listinfo/pstricks




More information about the PSTricks mailing list