1 | initial version |
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()
which produces the above picture. You could also do it with parametric_plot3d, but you'd have to do the revolution manually (i.e. multiply x, y, and z by the appropriate trigonometric functions).
2 | No.2 Revision |
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()
which produces the above picture. You could also do it with parametric_plot3d, 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).