[pstricks] 3D-Coordinate-System

Markus Krebs markuskrebs at web.de
Sat Aug 18 16:39:59 CEST 2007


Hello Herbert!

Thanks a lot.

But why is it useful to use Alpha for the ticklabels?

The direction for the labels in case of coorType = 2 are

x_1 --> 180
x_2 --> 90
x_3 --> 0

One of the things you mentioned "every macro works in the same way" 
--> \parametricplotThreeD does not. \parametricplotThreeD is still 
using Alpha and Beta (?)
I've tried the example with coorType=0 and coorType=2. The red and 
the blue line shoud be identical in both types.

Minimal example

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

\documentclass[landscape]{article}
\usepackage{pst-3dplot,pstricks-add}
\makeatletter
         \def\psxyzlabel#1{\tiny\expandafter\@stripDecimals#1..\@nil}
\makeatother
%
\begin{document}

\psset{unit=1.15,plotpoints=2000,coorType=2}
\begin{pspicture}(-3,-2)(5.5,3.5)
\psgrid[subgriddiv=2]
\pstThreeDCoor[xMin=0,
                                                         yMin=0,
                                                         zMin=0,
                                                         xMax=3,
                                                         yMax=5,
                                                         zMax=3,
                                                         nameX=$x_1$,
                                                         nameY=$x_2$,
                                                         nameZ=$x_3$,
                                                         IIIDticks=true,
                                                         drawing=true]
%
\pstThreeDBox(0,0,0)(2,0,0)(0,4,0)(0,0,2)
%
\parametricplotThreeD[linecolor=blue,linewidth=2pt](-1,1){t t 3 mul 1 
add  t -2 mul 2 add}
\pstThreeDLine[linecolor=red,
                linewidth=1.5pt
                ](0,1,2)(1,4,0)

\pstThreeDNode(1.5,5.5,-1){H}
\uput{5pt}[270](H){$h$}
%
\parametricplotThreeD[linecolor=blue,
                            linewidth=2pt
                                 (-1,1){%
                              -2 t mul 2 add %
                               2 t mul 2 add %
                               2 t mul
                               }
\pstThreeDLine[linecolor=brown,
                linewidth=1.5pt
                ](2,2,0)(0,4,2)
%
\end{pspicture}
\end{document}

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Markus

At 23:07 17.08.2007, you wrote:
>Markus Krebs wrote:
> > 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.
> >
>
>ok, missed this point. Added now this behaviour as coorType=2.
>coorTyp=0 is the old and default behaviour (Alpha and Beta valid)
>=1 , the angle between y and z axes is 90 degrees and y and x is Alpha
>      (Beta is not valid)
>=2, as 1 but with a shortened x-axis of factor 1/sqrt(2) and Alpha only
>       valid for the ticks, if any  (Beta is not valid)
>
>
>Herbert
>_______________________________________________
>pstricks mailing list
>pstricks at tug.org
>http://tug.org/mailman/listinfo/pstricks




More information about the PSTricks mailing list