# How do I draw an anticlepsydra in LaTeX?

I'd like to approach the sphere's volume by Cavalieri's principle, and so I want to give the students an anticlepsydra's drawing, to guide them to the sphere's formula. Something like this: The sphere I got right, but the area of the anticlepsydra that's equal to the sphere I'd like to be in a different color, and I don't quite know how to do it. Don't even know if it's best for me to use a 3d drawing or stick with 2d. Sugestions? Anyone's done that?

• It would help those trying to help you, if you edited your question and provided what code you have, to this point. Aug 25, 2021 at 0:51
• If you want to reproduce the picture as it is, it would be better a 2d drawing because the cylinder has a 'fake cavalier' perspective. In my opinion it would look better with an axonometric perspective in 3d, but the drawing will be quite more difficult. Aug 25, 2021 at 10:27

This is an easy way to do it. In 2d and using a 'fake cavalier' perspective as in the OP picture.

The shadings are not necessary. I made them trying to control the transparency and the light of both figures.

This is my proposal:

\documentclass[tikz,border=2mm]{standalone}

\def\r{0.3} % aspect between ellipse semi-axes

color(0cm)=(blue!10);
color(1cm)=(blue!80)
}

color(0pt)=(blue!80);
color(40pt)=(blue!20);
color(100pt)=(blue!100)
}

\tikzset
{
arrow/.style={solid,stealth-stealth},
plane/.style={solid,fill=gray,fill opacity=0.4},
cylinder base/.style={solid,fill=blue!50,fill opacity=0.7},
}

\begin{document}
\begin{tikzpicture}[line join=round,line cap=round,scale=1.5,densely dashed]
% plane, lines and labels
\draw (3,0) -- (3,-0.75);
\draw (4,0) -- (4,-0.75);
\draw[arrow] (3,-0.75) -- (4,-0.75) node[midway,above] {$R$};
\draw[plane] (-2,0) ++ (225:1.2) --++ (7,0) --++ (45:2.4) --++ (-7,0) -- cycle;
\draw (0,0) -- (4,0);
\draw (2,2) -- (4,0);
\draw (2,0) -- (4,2);
\draw (3,1) node [right] {$V$} -- (3,0);
\draw[arrow] (1.5,0) -- (1.5,2) node[midway,right] {$2R$};
% sphere
\draw (1,1) arc (0:180:1 and \r);
\draw[sphere] (0,1) circle (1);
\draw[solid] (1,1) arc (0:-180:1 and \r);
% cylinder (and topmost line)
\draw (4,0) arc (0:180:1 and \r);
\draw[cylinder surface] (4,0) arc (0:-180:1 and \r) -- (2,2) arc (180:360:1 and \r) -- cycle;
\draw[cylinder base] (3,2) ellipse (1 and \r);
\draw (0,2) -- (4,2);
\end{tikzpicture}
\end{document} Edit 1: I know you want an area in different color but I don't know which one.

Edit 2: Following Black Mild's comment I filled the inner cone in another color. But to do this I prefer a 3d drawing, so there it is:

\documentclass[border=2mm]{standalone}
\usepackage    {tikz}

% isometric axes
\pgfmathsetmacro\xx{1/sqrt(2)}
\pgfmathsetmacro\xy{1/sqrt(6)}
\pgfmathsetmacro\zz{sqrt(2/3)}

color(0cm)=(blue!10);
color(1cm)=(blue!80)
}

color(0pt)=(blue!80);
color(30pt)=(blue!20);
color(100pt)=(blue!100)
}

% styles
\tikzset%
{%
isometric/.style={x={(-\xx cm,-\xy cm)},y={(\xx cm,-\xy cm)},z={(0cm,\zz cm)}},
plane/.style={fill=gray,fill opacity=0.4},
cylinder base/.style={fill=blue!50,fill opacity=0.7},
cone/.style={fill=red,fill opacity=0.5}
}

\begin{document}
\begin{tikzpicture}[isometric,line cap=round,line join=round]
% plane and points
\draw[plane] (-3,-9,-2) -- (-3,4.5,-2) -- (3,4.5,-2) -- (3,-9,-2) -- cycle;
\draw[dashed] (0,-6,-2) -- (0,4.5,-2);
\foreach\y in {-6,0}
\draw[fill=green] (0,\y,-2) circle (1pt);
% sphere
\draw         (0,-6,0) ++ (315:2) arc (315:135:2);
\draw[sphere] (0,-6,0) circle (2cm);
\draw         (0,-6,0) ++ (-45:2) arc (-45:135:2);
% cone
\draw[cone] (2,0,2) arc (0:90:\r) -- (0,-2,-2) arc (-90:180:2) -- cycle;
\draw[cone] (0,0,2) circle (2);
% cylinder
\draw (0,0,-2) ++ (315:2) arc (315:135:2);
\draw[cylinder surface] (0,0,-2) ++ (-45:2) arc (-45:135:2) --++ (0,0,4) arc (135:-45:2) -- cycle;
\draw[cylinder base] (0,0,2) circle (2);
% lines and points
\draw[dashed] (0,-6,2) -- (0,4.5,2);
\foreach\y in {0,2}
\draw[dashed] (0,\y,2) -- (0,\y,5);
\draw[stealth-stealth] (0,4.5,2) -- (0,4.5,-2) node [midway,right] {$2R$};
\draw[stealth-stealth] (0,0,5) -- (0,2,5) node [midway,above] {$R$};
\foreach\y in {-6,0}
\draw[fill=green] (0,\y,2) circle (1pt);
\end{tikzpicture}
\end{document} • I guess that OP wants different some shading color on the surface of the inner cone Aug 28, 2021 at 12:04
• @BlackMild, you are right, I suppose. So I made an edit. Aug 28, 2021 at 16:09

You can use 3dtools. With phi=90, you can try

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{3dtools,calc}% https://github.com/marmotghost/tikz-3dtools
\begin{document}
\begin{tikzpicture}[3d/install view={phi=90,theta=70},line cap=butt,line join=round,declare function={R=3; },c/.style={circle,fill,inner sep=1pt}]
\path
(0,0,0) coordinate (O)
(0,0,R)  coordinate (N)
(0,0,-R)  coordinate (S)
(0,2.5*R,-R) coordinate (B)
(0,2.5*R,R) coordinate (T)
;
\path[save named path=sph,3d/screen coords] (O) circle[radius=R];
\pic{3d/circle on sphere={R=R,C={(O)}}};
\pic{3d/circle on sphere={R=R,C={(O)},P={(O)}, n={(1,2,0)}}};
([xshift=-R*1cm]B) -- ([xshift=-R*1cm]T)
([xshift=R*1cm]B) -- ([xshift=R*1cm]T)  (N) -- ([xshift=R*1cm]T);
\draw[3d/hidden]
([xshift=R*1cm]B) -- ([xshift=-R*1cm]B)
([xshift=-R*1cm]B) -- ([xshift=R*1cm]T)
([xshift=-R*1cm]T) -- ([xshift=R*1cm]B)
(T) -- (B)  (S) -- (N) ;
\path   pic{3d/circle on sphere={R=R,C={(B)},P={(B)},n={(0,0,1)}}};

\path [save named path=d] (S) -- ([xshift=-R*1cm]B);
\tikzset{3d/draw ordered paths={d,sph}}
\path foreach \p/\g in {O/180,S/150,N/180,T/90,B/-90}{(\p)node[c]{}+(\g:2.5mm) node{$\p$}};
\end{tikzpicture}
\end{document} With phi=110, you can try

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{3dtools,calc}% https://github.com/marmotghost/tikz-3dtools
\begin{document}
\begin{tikzpicture}[3d/install view={phi=110,theta=70},line cap=butt,
line join=round,declare function={R=2; },c/.style={circle,fill,inner sep=1pt}]
\path
(0,0,0) coordinate (O)
(0,0,R)  coordinate (N)
(0,0,-R)  coordinate (S)
(0,2.5*R,-R) coordinate (B)
(0,2.5*R,R) coordinate (T)
;
\path[save named
\pic{3d/circle on sphere={R=R,C={(O)}}};
\pic{3d/circle on sphere={R=R,C={(O)},P={(O)}, n={(1,2,0)}}};
\draw[3d/hidden] (S) -- (N) (B) -- (T);
\draw[3d/visible] (N) -- (T);
\path (B) [3d/visible/.style={save named path=cyc,draw={none}}] pic{3d/frustum={R=R,r=R,h=2*R}};
\path [save named path=d] (S) -- (B);
\begin{scope} [canvas is xy plane at z=-R]
\path[save named path=rec] (-2*R,-2*R) rectangle (2.5*R,4*R);
\end{scope}
\tikzset{3d/draw ordered paths={rec,d,sph,cyc}}
\path foreach \p/\g in {O/180,S/150,N/180,T/90,B/-90}
{(\p)node[c]{}+(\g:2.5mm) node{$\p$}};
\end{tikzpicture}
\end{document} • +1: maybe worth noting that 3dtools is not longer under development and not available on CTAN. Aug 26, 2021 at 15:13

A bit try with Asymptote!

Compile the following code at http://asymptote.ualberta.ca/

// settings.render=10;
import solids;
size(10cm,0);
currentprojection=orthographic(1,0,0.15);
currentlight=White;

revolution b=sphere(O,1);
draw(surface(b),yellow+opacity(0.3));
skeleton s;
b.transverse(s,reltime(b.g,0.5),P=currentprojection);
draw(s.transverse.back,dashed+black);
draw(s.transverse.front,black);
path3 yourcicle3 = circle((0,0,0), r=1, normal=(1,0,0.15));
draw(yourcicle3);

draw(shift((0,3,-1))*scale(1,1,2)*unitcylinder,paleyellow+opacity(.5));
draw(scale(.7)*Label("$2R$"),(0,1.5,-1)--(0,1.5,1),Arrows3);
draw((0,0,1)--(0,4,1)^^(0,0,-1)--(0,4,-1),dashed);
draw((0,2,1)--(0,4,-1)^^(0,4,1)--(0,2,-1),linetype(new real[] {8,4}));
draw((0,2,1)--(0,2,-1)^^(0,4,1)--(0,4,-1));
label("$V$",(0,3,0),2dir(0));

draw(circle((0,3,1), r=1, normal=(0,0,1)));
path3 c = circle((0,3,-1), r=1, normal=(0,0,1));
draw(subpath(c,reltime(c,0.25),reltime(c,0.75)),dashed);
draw(subpath(c,reltime(c,0.75),reltime(c,1))&subpath(c,reltime(c,0),reltime(c,0.25)));

path3 pl=(-3,-3,0)--(5,-4.5,0)--(5,2,0)--(-3,3.5,0)--cycle;
draw(surface(shift(0,2,-1)*pl),blue+opacity(.5),black);
draw((0,3,0)--(0,3,-1.5)^^(0,4,-1)--(0,4,-1.5),linetype(new real[] {4,4}));
draw(scale(.7)*Label("$R$"),(0,3,-1.4)--(0,4,-1.4),Arrows3); • +1: I really should start learning asymptote. Aug 26, 2021 at 19:01
• @Dr.ManuelKuehner I'm surely agree with you. +1 also for me. Aug 26, 2021 at 19:03