Rotational 3d
How can I rotate a function like f(x)=sqrt(x) (from 0 to3) around the x-axis? I would like to have a 3D picture of the rotational.
Thanks. Thomas
add a comment
How can I rotate a function like f(x)=sqrt(x) (from 0 to3) around the x-axis? I would like to have a 3D picture of the rotational.
Thanks. Thomas
Here is the Sage command.
revolution_plot3d(sqrt(x),(x,0,3),(0,2*pi),show_curve=True,parallel_axis='x',opacity=0.5)
I sometimes do it using my own code.
x,theta=var('x,theta')
def Vol_Rx(f,x,theta,k):
return([x,-sin(theta)*(f(x)-k),cos(theta)*(f(x)-k)+k])
def Vol_Ry(f,x,theta,k):
return([(x-k)*cos(theta)+k,sin(theta)*(x-k),f(x)])
f(x)=sqrt(x)
a=0
b=3
p=parametric_plot3d(Vol_Rx(f,x,theta,0),(x,a,b),(theta,0,2*pi))
p+=parametric_plot3d(Vol_Rx(f,x,0,0),(x,a,b),color='red',thickness=3)
show(p)
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2012-11-12 14:05:55 +0100
Seen: 665 times
Last updated: Nov 12 '12