Shared211f18 Quadric Surfaces.sagewsOpen in CoCalc

Some examples of quadric surfaces.

**Instructions: ** Click the "Open in Cocalc" at the upper right corner of this page to display the pictures.

To plot things surfaces f(x,y,z)=f(x,y,z)= constant in x,y,z space use the "implicit plot" command. Use "==" (double equal signs) for the equal sign. It's necessary to start by telling Sage that x,yx,y and zz are variables. That's what the "var" command does.

Here are some examples from the text. You can rotate the figures with your mouse to see if from different points of view.

# Example 3 in section 10.3  An ellipsoid.
x,y,z=var("x,y,z")
implicit_plot3d(x^2+y^2/9+z^2/4 == 1, (x,-3,3),(y,-3,3),(z,-3,3),aspect_ratio=1)
3D rendering not yet implemented
#Example 4 section 10.3  A paraboloid
implicit_plot3d(z==4*x^2+y^2, (x,-2,2),(y,-2,2),(z,0,4), opacity = .5,aspect_ratio=1)
3D rendering not yet implemented
#Figure 5 from sec 10.3  A hyperboloid.
implicit_plot3d(x^2/4+y^2-z^2/4==1,(x,-4,4),(y,-4,4),(z,-4,4),opacity=0.5, aspect_ratio=1)
3D rendering not yet implemented