%% $Id: pst-ellipsoid-doc-exa15.tex 1284 2026-06-08 05:56:52Z herbert $
\begin{externalDocument}[
  compiler=lualatex, runs=1, crop, cleanup,
  %xindex, xindexOptions={-l DE --config AU},
  %mpwidth=0.6\linewidth, 
  %force,
  usefancyvrb=false,
  docType=latex,
]{voss}
\DocumentMetadata{}
\documentclass{article}
\pagestyle{empty}
\usepackage{libertinus}
%StartVisiblePreamble
\usepackage[dvipsnames,svgnames]{pstricks}
\usepackage{pst-ellipsoid}
%StopVisiblePreamble
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\psset{viewpoint=100 120 30 rtp2xyz,Decran=200,lightsrc=viewpoint,solidmemory,incolor=cyan!20,fillcolor=yellow!50}
\setEllipsoidVars
\pstVerb{/xP 0.6 xO1 mul def
/zP xP zO1 mul xO1 div def
/dP {2 dict begin /yP exch def /xP exch def xP SinT mul zP CosT mul add abs end} def
/radiusCylindre {2 dict begin /yP exch def /xP exch def b1 1 b1 xP yP dP mul a1 c1 mul div dup mul sub sqrt mul} def
}
\psSolid[object=plan,definition=normalpoint,args={xP 0 zP [nX]},action=none,name=Plan1]
\psSolid[object=ellipsoid,linewidth=0.01,ngrid=36 18,plansepare=Plan1,
         base=0 360 -90 90,name=coupeA,action=none,a=a1,b=b1,c=c1]%
\psSolid[object=load,load=coupeA0,action=none,name=part0,rm=0,hollow]%
% les coordonnées d'un point du deuxième plan de coupe
\pstVerb{/xP2 0.4 xO1 mul def /zP2 xP2 zO1 mul xO1 div def}%
\psSolid[object=plan,definition=normalpoint,args={xP2 0 zP2 [SinT 0 CosT]},action=none,name=Plan2]
\psSolid[object=ellipsoid,linewidth=0.01,ngrid=36 18,plansepare=Plan2,
         base=0 360 -90 90,name=coupeB,action=none,a=a1,b=b1,c=c1]%
\psSolid[object=load,load=coupeB1,action=none,name=part1,rm=0,hollow]%
\psSolid[object=fusion,base=part0 part1]
\axesIIID(3,2,1)(4,3,2)
\end{pspicture}
\end{document}
\end{externalDocument}