RevolutionPlot3D

General discussion about Mathematica features and functionality...
Forum Rules
By using the Wolfram Faculty Program Forum, you agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, or sexually oriented material. Wolfram Faculty Program Forum administrators have the right to remove, edit, move or close any topic at any time should we see fit.

Personal Information: Posts in this forum may be viewed by non-members; however, the forum prohibits non-members from viewing your profile. Although your email address is hidden from both non-members and members, your account is initially configured to allow members to contact you via email through the forum. If you wish to hide your profile, or prohibit others from contacting you directly, you may change these settings by updating your profile through the User Control Panel.

Attachments: Attachments are not currently enabled on this forum. To share a file with others on this site, simply upload your file to the online storage service of your choice and include a link to the file within your post. If your school does not offer an online file storage and sharing service, the following sites provide free basic online file storage and sharing: Mozy, FilesAnywhere, Adrive, and KeepandShare.

RevolutionPlot3D

Postby Adam_Caudell » Tue Feb 21, 2012 5:14 pm

I am trying to create a Manipulate[ ] line of code to demonstrate to my students surfaces of revolution. I have seen a few Demonstrations on the Demonstrations site, but they are very specific and more detailed that I wanted. I want to be able to change the functions and the axes of revolution.

Ideally, I want to show the 2-D shaded region and then have a slider that rotates the shaded region about any given axis.

For example, I would want to revolve the region bounded by y=(1/2)x^2+1 and y=(1/2)x+7 between x=[0,4] about the line y=-1. I would want to start by showing the shaded region bounded by the curves, then have a slider that would revolve the shaded region about the given axis.

My students have access to Mathematica and I was hoping I could create a generalized template that they could use to enter their own boundary functions as well as any axis of revolution so as to better visualize this concept.

Any help is greatly appreciated.
User avatar
Adam_Caudell
 
Posts: 4
Joined: Fri Feb 26, 2010 6:24 am
Organization: Minarets High School
Department: Mathematics

Re: RevolutionPlot3D

Postby Michael_Rogers » Fri May 25, 2012 2:05 am

Try modifying one of the Demonstrations. For instance, in
http://demonstrations.wolfram.com/SolidsOfRevolution/
replace the Switch at the beginning with

f[xx_] := ff /. x -> xx;
g[xx_] := gg /. x -> xx;

and replace the variable fcns (the first Manipulate variable) with

{{ff, 2 Sin[x] + 4, "f"}, InputField},
{{gg, x/4, "g"}, InputField},

The code is set up, so that if you declare yrotate a Manipulate variable and remove the initialization (yrotate=-1), you can change the axis of revolution. If you want a vertical axis, you'll have to adapt the code. Fully doing what you want to do will take a fair amount of coding anyway. RevolutionPlot3D is probably not the way to go. It seems to only do axes that pass through the origin. I'd use ParametricPlot3D, just as in the above demonstration.
User avatar
Michael_Rogers
 
Posts: 10
Joined: Mon May 24, 2010 3:28 pm
Organization: Emory University
Department: Oxford College


Return to General Mathematica Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron