Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 90
#How would you plot the function y^3-x? var('x','y') plot3d(y^3-x,(x,0,3),(y,-1,1))
(x, y)
3D rendering not yet implemented
#Show how the function y^3-x and the function x^2 are related by adding them in the same plot. var('x''y') S1=plot3d(y^3-x,(x,0,3),(y,-1,1)) S2=plot3d(x^2,(x,0,3),(y,-1,1),color='red') show(S1+S2)
xy
3D rendering not yet implemented
#How can you use the aspect ratio command to receive a different visualization of the height and width of the graph? var('x','y') plot3d(y^3-x,(x,0,3),(y,-1,1), aspect_ratio=[1,1,1])
(x, y)
3D rendering not yet implemented
# Can you plot polar coordinates in 3D? ︠ab25ac97-95e4-45a6-a548-56c4a54df4d3︠ # try plotting (rho,theta,phi)=(2,pi/4,2pi/3) var('rho','theta','phi') plot3d(2,pi/4,2pi/3)
(rho, theta, phi)
Error in lines 2-2 Traceback (most recent call last): File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 982, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "<string>", line 1 plot3d(Integer(2),pi/Integer(4),2pi/Integer(3)) ^ SyntaxError: invalid syntax
# sage will not plot polar coordinates but you can name the variables whatever you want. However, they will always be shown as Cartesian points in plot3d. For example: var('rho','phi') f=(phi^3-rho) S=plot3d(f,(rho,0,3),(phi,-1,1)) show(S)
(rho, phi)
3D rendering not yet implemented
# Show how sage can use 3d graphing to portray trigonometric functions. var('x','y') S1 = plot3d(sin(x), (x, 0, 2*pi),(y,0,2*pi),opacity=.3) S2 = plot3d(cos(x),(x,0,2*pi),(y,0,2*pi),color='green',opacity=1) S3 = plot3d(tan(x),(x,0,2*pi),(y,0,2*pi),color='yellow',opacity=.4) show(S1+S2+S3)
(x, y)
3D rendering not yet implemented
#Here's another experiment var('x', 'y') z=9-1/4*(x**2+y**2) plot3d(9-1/4*(x**2+y**2),(x,-6,6),(y,-6,6))
(x, y)
3D rendering not yet implemented