Re: Solids of revolution

• To: mathgroup at smc.vnet.net
• Subject: [mg116600] Re: Solids of revolution
• From: Alexei Boulbitch <alexei.boulbitch at iee.lu>
• Date: Mon, 21 Feb 2011 05:34:54 -0500 (EST)

```Dear Tom,

you may use RevolutionPlot3D together with Amimate or Manipulate. I think that manipulate is better, since
there you can move the slider and explain your students what happens. For example, assume you would like
to chose to visualize a function like r*sin(r). Then copy to your notebook and evaluate the following simple code:

f[r_] := Sin[r]*r;

Manipulate[
RevolutionPlot3D[f[r], {r, 0, 20}, {\[CurlyPhi], 0., \[CurlyPhi]max}],
{{\[CurlyPhi]max, 0.1,
Dynamic[Row[{Style[
"\!\(\*SubscriptBox[\(\[CurlyPhi]\), \(max\)]\)= ", 14, Blue],
Style[NumberForm[\[CurlyPhi]max/(2 \[Pi])*360, {3, 1}], 14,
Blue], Style["\[Degree]", 14, Blue]}]]}, 0, 2 \[Pi], 0.01,
Appearance ->  Labeled}, ControlPlacement ->  Top]

This may already show what you need. It has however, some drawbacks. The main is that the image is coarse-grained when you pull
the slider and only becomes fine upon stopping it.

You may also use Animate instead of Manipulate with the same code (only Appearence->Labeled should be dropped):

f[r_] := Sin[r]*r;

Animate[
RevolutionPlot3D[f[r], {r, 0, 20}, {\[CurlyPhi], 0., \[CurlyPhi]max}],
{{\[CurlyPhi]max, 0.1,
Dynamic[Row[{Style[
"\!\(\*SubscriptBox[\(\[CurlyPhi]\), \(max\)]\)= ", 14, Blue],
Style[NumberForm[\[CurlyPhi]max/(2 \[Pi])*360, {3, 1}], 14,
Blue], Style["\[Degree]", 14, Blue]}]]}, 0, 2 \[Pi], 0.01},
ControlPlacement ->  Top]

This will play the same image as a movie. But in this case the whole movie will be coarse-grained.

The way around would be for example, to make a list of images and then to play it. Try this:

table = Table[
RevolutionPlot3D[
f[t], {t, 0, 20}, {\[CurlyPhi],
0., \[CurlyPhi]max}], {\[CurlyPhi]max, 0.1, 2 \[Pi], 0.2}];

ListAnimate[table, 5]

The number 5 in the second argument of the ListAnimate operator is the number of frames fer second. You may play with it. Check
Help/ListAnimate for other available parameters to play with. Note that in the Table operator the very last parameter defines
how smooth the movie will be played. The smaller it is chosen, the smoother it will rotate, but the price is the time the evaluation
will take. I have chosen it 0.2 to make evaluation faster, but for the purposes of a presentation you may wish to make it smaller.

Ok, this again has a drawback, it takes too long to wait before (i) the list of images will be created, and (ii) the
animation will start. The first problem may be avoided, if you in the very beginning of the lesson will evaluate the notebook
with the cell containing the table operator marked as Initialization Cell (Menu/Cell/Cell Properties/Initialization Cell). However,
the evaluation of the operator ListAnimate anyway takes too long.

The way around is to save this animation as the avi file (before yore lesson) and play during the lesson this ready-to-use file.
Evaluate this:

table = Table[
RevolutionPlot3D[
f[t], {t, 0, 20}, {\[CurlyPhi],
0., \[CurlyPhi]max}], {\[CurlyPhi]max, 0.1, 2 \[Pi], 0.05}];
Export[NotebookDirectory[]<>  "tom.avi", table]

Note that the evaluation of these two commands should take some time, the more time the smaller the parameter in the
end of Table is. Here I specified it 0.05 to be smoother. You do it however, once and before the lesson. These operators will save
the movie file entitled "tom.avi" in the same directory where you have your Mathematica file. Then you can move this file
to whatever place you like and play it fast during the lesson.

I should add that the problems here (I mean the too long duration of evaluation)  may partially be due to complexity
of the function). With a different function it may be faster. Thogh I am not sure, I have a feeling that another source
of slow speed is the use of the RevolutionPlot.

Best, Alexei

Hello,  I'm a high school math teacher,  currently working on some
lessons to teach the volume of solids formed by revolution.

I have some good starting points, a few animations and
demonstrations,  but if anyone would be willing to share any of their
nice illustrations/graphics/commands  I would welcome that.  It would
be helpful for my students and helpful for me to learn to use
Mathematica more effectively.

There are some nice examples at this websitehttp://curvebank.calstatela.edu/volrev/volrev.htm
that are done with Mathematica but the author has not published the
code so I am not sure how to create similar results.

I apologize for a very generic request.   For many on this group,
these are simple ideas to teach and program.  For me,  this is at the
limit of my mathematical and Mathematica knowledge and I'd like to
better understand and present these concepts.

If you have anything to share that might be more than a simple post to
this group,  you can email me at tidetabletom at gmail.com

Sincerely,  Tom De Vries

--
Alexei Boulbitch, Dr. habil.
Senior Scientist
Material Development

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 CONTERN
Luxembourg

Tel: +352 2454 2566
Fax: +352 2454 3566
Mobile: +49 (0) 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu

www.iee.lu

--

This e-mail may contain trade secrets or privileged, undisclosed or
otherwise confidential information. If you are not the intended
recipient and have received this e-mail in error, you are hereby
notified that any review, copying or distribution of it is strictly
prohibited. Please inform us immediately and destroy the original