[pstricks] pst-solides3d and external files (colours)

Leonardo lsbplsb at yahoo.com
Wed Mar 27 22:38:11 CET 2024


 Dear Herbert, thanks for reply.

Probably I'm doing something wrong.

First, to generate the object, file pst3d.tex

\documentclass{article}
\usepackage{pstricks,pst-solides3d}
\begin{document}
\begin{pspicture}(-7,-2)(7,4)
\psset{lightsrc=80 30 30}
\psset{viewpoint=1000 60 20 rtp2xyz,Decran=1000}
\psframe(-7,-2)(7,4)
\psset{solidmemory}
\codejps{/a 2 def /b 2 def}%
\defFunction[algebraic]{F3}(t)
 {a*(1+cos(t))}
 {b*tan(t/2)}
 {a*sin(t)}
\defFunction[algebraic]{F3'}(t)
 {-a*sin(t)}
 {b*(1+tan(1/2*t)^2)}
 {a*cos(t)}
\psSolid[object=courbe,
 range=-2.7468 2.7468,
 ngrid=72 12,
 function=F3,hue=0 1 0.7 1,
 action=none,name=H1,
 r=1]%
\psSolid[object=cylindrecreux,
 h=20,r=1,RotX=90,
 incolor=green!30,action=none,
 name=C1,
 ngrid=36 36](2,10,0)
\psSolid[object=fusion,
 base=H1 C1,
 filename=horoptere,
 action=writesolid]
\composeSolid
\end{pspicture}
\end{document}

and run latex + dvips + gs as:

$ latex pst3d.tex
$ dvips pst3d.dvi
$ gs -dNOSAFER pst3d.ps

this generate all 4 files horoptere-*.dat.

Now, to load the horoptere, file pst3d_load.tex

\documentclass{article}
\usepackage{pstricks,pst-solides3d}
\begin{document}
\begin{pspicture}(-5,-3.5)(4,3)
\psset{lightsrc=80 30 30}
\psset{viewpoint=100 60 20 rtp2xyz,Decran=75}
\psframe*[linecolor=cyan!30](-4.5,-3)(3.5,3)
\psSolid[object=datfile,filename=horoptere]
\end{pspicture}
\end{document}

and run latex + dvipdf as

$ latex pst3d_load.tex
$ dvipdf -dNOSAFER pst3d_load.dvi

file pst3d_load.pdf has both cylinders with white colours faces.

Any idea of why the twisted cylinder is not with colours faces?

Thanks,
Leonardo  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20240327/b6e71c45/attachment.htm>


More information about the PSTricks mailing list.