# How to Animate Solid of Revolution from SemiCircle to Torus?

**URL:** <https://discourse.julialang.org/t/how-to-animate-solid-of-revolution-from-semicircle-to-torus/92178>\
**Category:** General Usage\
**Tags:** package\
**Created:** [December 27, 2022, 5:41am UTC](https://discourse.julialang.org/t/how-to-animate-solid-of-revolution-from-semicircle-to-torus/92178 "2022-12-27T05:41:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [December 27, 2022, 5:41am UTC](https://discourse.julialang.org/t/how-to-animate-solid-of-revolution-from-semicircle-to-torus/92178/1 "2022-12-27T05:41:01Z")

</div>

Hi all,

I want to know how to create animation, from semicircle become cone then torus like this? So People can imagine how it looks like.

![Capture d’écran_2022-12-27_12-33-37](https://global.discourse-cdn.com/julialang/original/3X/c/a/cad55c1b50c5e1505421d5e2a0c88464aa86bc87.png)

This is called Solids of Revolution: Method of Disks. When a plane region revolved about a fixed line.

I created the copy with Tikz not with Julia:

```julia
\documentclass[tikz]{standalone}

\begin{document}
	\begin{tikzpicture}
		
		% big circle
		\draw(2,-1) arc (-90:90:2.5 and 2);% half circle facing left
		\draw(2,-1) arc (-90:90:-2.5 and 2);% half circle facing right
		
		% left circle
		\draw (0.33,-0.5) arc (-90:90:-0.25 and 1.5);% left half of the left circle
		\draw[dashed] (0.33,-0.5) arc (-90:90:0.25 and 1.5);% right half of the left circle
	
		% middle circle
		\draw(2,-1) arc (-90:90:-0.3 and 2);% left half of the middle circle 
		\draw[dashed] (2,-1) arc (-90:90:0.3 and 2);% right half of the middle circle

		% right circle
		\draw (3.67,-0.5) arc (-90:90:-0.25 and 1.5);% left half of the right circle
		\draw[dashed] (3.67,-0.5) arc (-90:90:0.25 and 1.5);% right half of the right circle
				
		%\draw (4,1.5) ellipse (0.5 and 1.5);% a circle / the right ellipse
		\draw (-1.25,1.5) node {$\phi$};
		
		% x ticks
		\draw (-0.7,1) -- (4.7,1);% middle line / diameter
		
		% Right image / Cone
		
		% left circle
		\draw (7.73,0.5) arc (-90:90:-0.25 and 0.5);% left half of the left circle
		\draw[dashed] (7.73,0.5) arc (-90:90:0.25 and 0.5);% right half of the left circle
		
		% middle circle
		\draw(9,0.1) arc (-90:90:-0.3 and 0.9);% left half of the middle circle 
		\draw[dashed] (9,0.1) arc (-90:90:0.3 and 0.9);% right half of the middle circle
		
		% right circle
		\draw (10.88,-0.5) arc (-90:90:-0.35 and 1.5);% left half of the right circle
		\draw (10.88,-0.5) arc (-90:90:0.35 and 1.5);% right half of the right circle
		
		%\draw (4,1.5) ellipse (0.5 and 1.5);% a circle / the right ellipse
		\draw (5.25,1.5) node {$\phi_{2}$};
		
		% upper line / upper pythagoras
		\draw (6,1) -- (10.88,2.5);% middle line / diameter
		
		% lower line / lower pythagoras
		\draw (6,1) -- (10.88,-0.5);% middle line / diameter
		 
		% middle line
		\draw (6,1) -- (11.7,1);% middle line / diameter
		
	\end{tikzpicture}
\end{document}

```

![Capture d’écran_2022-12-27_12-40-42](https://global.discourse-cdn.com/julialang/original/3X/1/2/12d3aabd83a511810ef33ba869639af9817348c6.png)

It is not Tikz discourse, but I share Tikz code if that is allowed…
