Ask Your Question
2

How to plot solids of revolution

asked 2011-02-27 08:54:58 +0100

trk gravatar image

Hi,

Is it possible to plot the solid generated by revolving a curve about a line?

For example, I want to see what kind of solid is generated from this question:

Use shells to find the solid generated from the region in the 1st quadrant bounded by $y=x$ and $y=x^2$, revolved about $x=-1$.

The volume of the solid is $\frac{\pi}{2}$. How can I view this solid? I checked the sage calculus tutorial for clues but couldn't find any.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2011-02-27 10:25:10 +0100

DSM gravatar image

updated 2011-02-27 10:53:53 +0100

It might take a bit of tweaking to get what you want, but one option is to take a look at the semi-secret function revolution_plot3d. The documentation (help(revolution_plot3d) or revolution_plot3d?) has an example which is similar to yours but still different:


        sage: line=u
        sage: parabola=u^2
        sage: sur1=revolution_plot3d(line,(u,0,1),opacity=0.5,rgbcolor=(1,0.5,0),show_curve=True,parallel_axis='x')
        sage: sur2=revolution_plot3d(parabola,(u,0,1),opacity=0.5,rgbcolor=(0,1,0),show_curve=True,parallel_axis='x')
        sage: (sur1+sur2).show()

image description

which produces the above picture. You could also do it with parametric_plot3d/implicit_plot3d, but you'd have to do the revolution manually (i.e. multiply x, y, and z by the appropriate trigonometric functions).

edit flag offensive delete link more
4

answered 2011-02-27 09:21:36 +0100

niles gravatar image

updated 2011-02-27 16:56:13 +0100

I think cylindrical_plot3d might be what you're looking for. Convert your equations to give x as a function of y, and then use this to compute the radius for each value of y. Of course you also need to compute where your equations intersect to get the appropriate bounds for y. I've omitted this step for now . . .

sage: var('y,theta')
(y, theta)
sage: s1 = cylindrical_plot3d(y+1,(theta,0,3*pi/2),(y,0,1), opacity=1, aspect_ratio=1)
sage: s2 = cylindrical_plot3d(sqrt(y)+1,(theta,0,3*pi/2),(y,0,1), opacity=.5, color='red')
sage: s1+s2

image description

(Note, in this version I just let theta run from 0 to 3*pi/2 so you could see just part of the revolved surfaces. Go all the way to 2*pi to see the entire object.)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-02-27 08:54:58 +0100

Seen: 2,327 times

Last updated: Feb 27 '11