add tag
Anonymous 1123
I see [this question](https://tex.stackexchange.com/questions/462774/drawing-a-tank-with-water-in-it) 


![ScreenHunter 99.png](/image?hash=67afadd4112d5e3a78239e456bac1b42f60aa45168c149a4ab1ffd4e340767da)

How to draw it with 3dtools?
Top Answer
user 3.14159
Here is a simplistic way of doing this.
```
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{calc,3dtools}% https://github.com/marmotghost/tikz-3dtools
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,
	3d/install view={phi=0,theta=70},
	declare function={R=3;H=4;h=2.5;},
	same bounding box=A]
 \fill[blue] (-R,0,0) arc[start angle=180,end angle=360,radius=R]
  -- (R,0,h) arc[start angle=360,end angle=180,radius=R] -- cycle;
 \pgfmathtruncatemacro{\itest}{screendepth(0,0,1)<0?0:1}
 \ifnum\itest=0
  \fill[blue!50] (0,0,0) circle[radius=R];
 \else
  \fill[blue!50] (0,0,h) circle[radius=R];
 \fi
 \pic{3d/frustum={r=R,R=R,h=H}};
\end{tikzpicture}
\end{document}
```
![Screen Shot 2021-04-18 at 11.29.45 PM.png](/image?hash=376e70353cbb78376f05d4f1599841e0615b54c04c9254373226fa99fb975e20)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.