%% $Id: pst-hyperboloid-doc-exa4.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,-7)(5,6)
\psframe(-8,-7)(5,6)
\psset{solidmemory,viewpoint=50 60 20 rtp2xyz,lightsrc=viewpoint,Decran=40}
\pstVerb{/X0 0.5 def}%
\psSolid[object=grille,base=-4 8 -4 4,ngrid=12 8,linewidth=0.5\pslinewidth,linecolor=red](0,0,-4)%
\psHyperboloid[hollow,incolor=yellow!50,fillcolor=ForestGreen!20,plansepare={[1 0 0 X0 neg]},
   name=coupeHyperboloidTest,action=none]
\psSolid[object=load,incolor=yellow!50,fillcolor=ForestGreen!20,linewidth=0.5\pslinewidth,
   rm=0 1,load=coupeHyperboloidTest1]
\psSolid[object=load,incolor=yellow!50,fillcolor=ForestGreen!20, linewidth=0.5\pslinewidth,
   rm=0 1 333,load=coupeHyperboloidTest0](4,0,0)
\defFunction[algebraic]{hyperbol3}(t){X0}{t}{DemiAxeNonFocal*sqrt((t^2+X0^2)/(DemiAxeFocal^2)-1)}
\defFunction[algebraic]{hyperbol4}(t){X0}{t}{-DemiAxeNonFocal*sqrt((t^2+X0^2)/(DemiAxeFocal^2)-1)}
\psSolid[object=courbe,linewidth=2\pslinewidth,function=hyperbol3,range=Y0 neg -4,r=0,linecolor=red]%
\psSolid[object=courbe,linewidth=2\pslinewidth,function=hyperbol3,range=Y0 4,r=0,linecolor=red]%
\psSolid[object=courbe,linewidth=2\pslinewidth,function=hyperbol4,range=Y0 4,r=0,linecolor=red]%
\psSolid[object=courbe,linewidth=2\pslinewidth,function=hyperbol4,range=Y0 neg -4, r=0,linecolor=red]%
\psSolid[object=plan,definition=equation,args={[1 0 0 -0.5] 90},linecolor=blue,planmarks,
  ngrid=,base=-4 4 -4 4,showBase,action=draw]
\gridIIID[Zmin=-4,Zmax=4](-4,8)(-4,4)
\end{pspicture}
\end{document}
\end{externalDocument}
