%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
%% Author:   Manuel Luque <manuel.luque27@gmail.com>
%%           Herbert Voß <hvoss@tug.org>   
%%
\csname PSTEllipsoidLoaded\endcsname
\let\PSTEllipsoidLoaded\endinput
% Requires some packages
\ifx\PSTricksLoaded\endinput       \else \input pstricks      \fi
\ifx\PSTSOLIDESIIIDLoaded\endinput \else \input pst-solides3d \fi
\def\fileversion{0.01}
\def\filedate{2026/06/09}
\message{`PSTEllipsoidLoaded' v\fileversion, \filedate}

%\pstheader{pst-ellipsoid.pro}
\definecolor{JaunePale}{rgb}{0.89 0.79 0.435}
\definecolor{coquille}{rgb}{0.984 0.95 0.718}
\def\setEllipsoidVars{\pstVerb{% les coordonnées de l'ombilic O1
/a1 3 def /b1 2 def /c1 1 def
% x=1 = a1*sqrt((a1^2-b1^2)/(a1^2-c1^2))
/xO1 a1 a1 dup mul b1 dup mul sub  a1 dup mul c1 dup mul sub div sqrt mul def
% zO1 = c1*sqrt((b1^2-c1^2)/(a1^2-c1^2))
/zO1 c1 b1 dup mul c1 dup mul sub  a1 dup mul c1 dup mul sub div sqrt mul def
/yO1 0 def
/CosT b1 dup mul c1 dup mul sub a1 dup mul c1 dup mul sub div sqrt b1 div a1 mul def
/SinT a1 dup mul b1 dup mul sub a1 dup mul c1 dup mul sub div sqrt b1 div c1 mul def
% les coordonnées d'un point du plan de coupe
/xP 0.95 xO1 mul def
/zP xP zO1 mul xO1 div def
% la normale au plan de coupe circulaire
/nX {SinT 0 CosT} def
% distance au plan de coupe
/dP xP SinT mul zP CosT mul add abs def
/radiusCylindre b1 1 b1 dP mul a1 c1 mul div dup mul sub sqrt mul def
}}

\endinput


