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

Toche, Patrick ptoche at cityu.edu.hk
Sun Nov 20 20:51:59 CET 2011


Some basic questions, that should set me back on track:

Please refer to the pst-3dplot documentation, the section discussing the Roessler system,

http://www.ctan.org/tex-archive/graphics/pstricks/contrib/pst-3dplot/

Given the data, which may be retrieved here:

ftp://ftp.comp.hkbu.edu.hk/pub/TeX/CTAN/graphics/pstricks/contrib/pst-3dplot/pst-3dplot-doc.dat

how does one know how to set the following?

\begin{pspicture}(-6,-3)(6,10)%
  
  \psset{% 
    xunit = 0.5cm
    , yunit = 0.5cm
  }%

How does one get the units right?

How does one know how to set x1,y1,x2,y2 in \begin{pspicture}(x1,y1)(x2,y2) ?

My best shot, with my system, was the following, largely based on Herbert's numbers (but how did you get those numbers Herbert?)

\begin{pspicture}(0,0)(2,15)%
  
  \psset{% 
   unit = 4000pt
  }%

But this was obtained by random trial and error. And I can't get the axes to appear right.

Compare the original Maple plot with my PStricks attempt,






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage{pst-3dplot}
\usepackage{pstricks-add}

\def\xMinVal{-0.05\space}
\iffalse
       xMin = -0.010
     , xMax = +0.000
     , yMin = +0.026
     , yMax = +0.030
     , zMin = +0.026
     , zMax = +0.030
\fi
\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%

\pagestyle{empty}%

\begin{document}%

\def\xMin{-1}%
\def\xMax{0}%
\def\yMin{0}%
\def\yMax{1}%
\def\zMin{0}%
\def\zMax{1}%
   
\def\N{50}%Number of Lines

\definecolorseries{lineColors}{hsb}{last}{red}{blue}%
\resetcolorseries[\N]{lineColors}%

\begin{pspicture}(-2,-2)(5,5)%

\psset{unit=5}

\pstThreeDCoor[%
  xMin = \xMin
  , xMax = \xMax
  , yMin = \yMin
  , yMax = \yMax
  , zMin = \zMin
  , zMax = \zMax
  , IIIDticks = true
  , IIIDlabels = true
  , IIIDticksize = 0.2
  , linecolor = red
  , linewidth = 2\pslinewidth
  , nameX = $\mathbf{x}$
  , nameY = $\mathbf{y}$
  , nameZ = $\mathbf{z}$
]%
   
\multido{\n=1+1}{\N}{%
  \readdata{\data}{data/xyz\n.txt}%
  \listplotThreeD[
    plotstyle = line
    , linecolor = {lineColors!![\n}% syntax is !![\n
  ]{\data}%
}%

\end{pspicture}

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xyz1.png
Type: image/png
Size: 47373 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20111121/953520c3/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xyz2.pdf
Type: application/pdf
Size: 19429 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20111121/953520c3/attachment-0001.pdf>


More information about the PSTricks mailing list