\documentclass{article}
\usepackage{pst-solides3d,pst-node,pst-plot,multido,url}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{colortbl}
\usepackage{array}
\usepackage[a4paper,bottom=2.5cm,top=2cm]{geometry}
%%\usepackage[frenchle]{babel}
\makeatletter

\title{\texttt{pst-solides3d} :\\
       Test 1}
\date{\today }
\begin{document}
\maketitle

\section {Tube avec PSTricks}

%\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz}
\psset{viewpoint=50 20 30 rtp2xyz}

\begin{center}
\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
\begin{pspicture*}(-5,-4)(6,3)
\psframe(-5,-4)(6,3)
\defFunction{F}(t){t Cos 2 mul}{t Sin 2 mul}{2 t mul Sin 1 mul}
\psSolid[object=courbe,
   r=0.25,
   function=F,
   range=0 2 pi mul,
   fillcolor=red,
   ngrid=120 12,
]
\end{pspicture*}
\end{center}

\section {Tube avec jps}

%\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz}
\psset{viewpoint=50 20 30 rtp2xyz}

\begin{center}
\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50}
\begin{pspicture*}(-5,-4)(6,3)
\psframe(-5,-4)(6,3)
\codejps{
/a 2 def
/b 1 def
%
/g {
3 dict begin
   /t exch def
   t Cos a mul %% #rpn# a*Cos(t)
   t Sin a mul %% #rpn# a*Sin(t)
   2 t mul Sin b mul %% #rpn# b*Sin(2*t)
end
} def
%
/g' {
3 dict begin
   /t exch def
   t Sin a neg mul %% #rpn# -a*Sin(t)
   t Cos a mul %% #rpn# a*Cos(t)
   2 t mul Cos 2 b mul mul %% #rpn# 2*b*Cos(2*t)
end
} def
%
0 pi 2 mul {g} CourbeR3
% stop
%
.3 setlinewidth
%/aretescachees false def
noir
%
GetCamPos setlightsrc
%solidgridOff
%
0 pi 2 mul (g) .25 [120 12] newtube
dup (rouge) outputcolors
drawsolid**
}
\end{pspicture*}
\end{center}

\end{document}
