%% $Id: pst-hyperboloid-doc-exa3.tex 1273 2026-06-02 10:47:27Z herbert $

\begin{externalDocument}[
  compiler=lualatex, runs=1, crop,
  %xindex, xindexOptions={-l DE --config AU},
  %mpwidth=0.6\linewidth, 
  usefancyvrb=false,
  docType=latex,
]{voss}
\DocumentMetadata{}
\documentclass{article}
\pagestyle{empty}
\usepackage{libertinus}
%StartVisiblePreamble
\usepackage[dvipsnames,svgnames]{pstricks}
\usepackage{pst-hyperboloid}
%StopVisiblePreamble
\begin{document}
\begin{pspicture}(-8,-3)(8,9)
\psset{unit=1cm}
\psset{viewpoint=50 60 30 rtp2xyz,lightsrc=viewpoint,Decran=50}
\psframe(-5,-3)(5,9)
\pstVerb{/iface 0 def
         /decalage 150 3.14159265359 mul 180 div def /H 6 def /Rayon 3 def}%
\defFunction[algebraic]{hyperboloidonesheet}(u,v)%
  {Rayon*(cos(u)*(1-v)+v*(cos(u+decalage)))}
  {Rayon*(sin(u)*(1-v)+v*(sin(u+decalage)))}
  {v*H}
\psSolid[object=surfaceparametree,
  ngrid=36 18, hue=0 1 0.5 1, %fillcolor=JaunePale,
  incolor=yellow!20,%show=all,num=all,
  fcol= 0 1 35{  % PS code for the color setting
    /Rang exch def
    Rang 2 div cvi 2 mul cvi 
    Rang eq {/Damier {iface (Red)} def}{/Damier {iface (Cyan)} def} ifelse
    18 { Damier /iface iface 1 add def } repeat
  } for, % end fcol=
  base=0 2 Pi mul 0 1, function=hyperboloidonesheet]
\gridIIID[Zmin=0,Zmax=6](-3,3)(-3,3)
\end{pspicture}
\end{document}
\end{externalDocument}
