Edit and compile if you like:
% Plane Sections of the Cylinder - Dandelin Spheres% Author: Hugues Vermeiren\documentclass{article}\usepackage{tikz}\usepackage[active,tightpage]{preview}\PreviewEnvironment{tikzpicture}\setlength\PreviewBorder{10pt}%\tikzset{MyPersp/.style={scale=1.8,x={(-0.8cm,-0.4cm)},y={(0.8cm,-0.4cm)},z={(0cm,1cm)}},% MyPersp/.style={scale=1.5,x={(0cm,0cm)},y={(1cm,0cm)},% z={(0cm,1cm)}}, % uncomment the two lines to get a lateral viewMyPoints/.style={fill=white,draw=black,thick}}\begin{document}\begin{tikzpicture}[MyPersp,font=\large]% the base circle is the unit circle in plane Oxy\def\h{2.5}% Heigth of the ellipse center (on the axis of the cylinder)\def\a{35}% angle of the section plane with the horizontal\def\aa{35}% angle that defines position of generatrix PA--PB\pgfmathparse{\h/tan(\a)}\let\b\pgfmathresult\pgfmathparse{sqrt(1/cos(\a)/cos(\a)-1)}\let\c\pgfmathresult %Center Focus distance of the section ellipse.\pgfmathparse{\c/sin(\a)}\let\p\pgfmathresult % Position of Dandelin spheres centers% on the Oz axis (\h +/- \p)\coordinate (A) at (2,\b,0);\coordinate (B) at (-2,\b,0);\coordinate (C) at (-2,-1.5,{(1.5+\b)*tan(\a)});\coordinate (D) at (2,-1.5,{(1.5+\b)*tan(\a)});\coordinate (E) at (2,-1.5,0);\coordinate (F) at (-2,-1.5,0);\coordinate (CLS) at (0,0,{\h-\p});\coordinate (CUS) at (0,0,{\h+\p});\coordinate (FA) at (0,{\c*cos(\a)},{-\c*sin(\a)+\h});% Focii\coordinate (FB) at (0,{-\c*cos(\a)},{\c*sin(\a)+\h});\coordinate (SA) at (0,1,{-tan(\a)+\h}); % Vertices of the% great axes of the ellipse\coordinate (SB) at (0,-1,{tan(\a)+\h});
Click to download: dandelin-spheres.tex • dandelin-spheres.pdf
Open in Overleaf: dandelin-spheres.tex