[pstricks] smoothing 3d plot (pst-3dplot with fileplotThreeD)

Toche, Patrick ptoche at cityu.edu.hk
Sun Nov 20 18:56:53 CET 2011


Dear Doris,

I thank you very much for your suggestions. 

My problem appears to be more serious than centering the pspicture on the page: I have problems locating the dataplot inside the pspicture itself! 

When I insert axes, the axes are properly centered. But my dataplot is all over the place, and I can't seem to re-define the axes to nicely wrap the dataplot.

Your suggestions are very welcome. I have found a reference to psgraph in the pst-plot-doc documentation. I'm reading it now and will get back to you if I have any success.

As for your other suggestion,  http://anamorphose.de/rechnen.pdf, one problem is my German. Focusing on the code between the text, I gather that it does something like what Herbert does in his postscript preamble. Problem is, I don't understand a word of it, in any language.

Take this,

\makeatletter%
\pst at def{ScalePointsThreeD}<%
    counttomark dup dup cvi eq not { exch pop } if
    /m exch def /n m 3 div cvi def
    n {  % checkdata
      3 -1 roll % y z x
      dup \xMinVal lt { pop pop pop /m m 3 sub def }{ 3 1 roll m 3 roll 
} ifelse
    } repeat % checkdata
    /n m 3 div cvi def
       n {
      tx at 3DPlotDict begin
      10 mul   %%%% all * 10
      3 1 roll 10 mul
      3 1 roll 10 mul
      3 1 roll
      saveCoor
      ConvertTo2D
      x2D \pst at number\psxunit mul y2D \pst at number\psyunit mul
      end
      m 1 sub 1 roll m 1 sub 1 roll /m m 3 sub def
     } repeat
 >
\makeatother%

The comment says that there is some multiplication by a factor of 10.
% all * 10
But what is being multiplied by 10 and why? Perhaps in my case, I need to select another factor? I just don't understand this preamble!

thanks,

Patrick.


More information about the PSTricks mailing list