Quadric Surface Plotter

## Description

This interact plots examples of the basic quadric surfaces. Select the surface to be plotted from the drop down menu, then adjust the coefficient of $x^2$ with the slider.

## Sage Cell

#### Code

```
var('x,y,z')
quadrics = {'Ellipsoid':x^2+y^2+z^2==1,'Elliptic paraboloid':x^2+y^2==z,'Hyperbolic paraboloid':x^2-y^2==z, '1-Sheeted Hyperboloid':x^2+y^2-z^2==1,'2-Sheeted Hyperboloid':x^2-y^2-z^2==1, 'Elliptic Cone':x^2+y^2==z^2, 'Elliptic cylinder':x^2 + y^2 == 1, 'Hyperbolic cylinder':x^2 - y^2 == 1, 'Parabolic cylinder':y == x^2}
@interact
def quads(q = selector(list(quadrics)), a = slider(0,5,1/2,default = 1)):
f = quadrics[q].subs({x:x*a^(1/2)})
if a==0 or q=='Cone': pretty_print(latex(f), " (degenerate)")
else: pretty_print(latex(f))
p = implicit_plot3d(f,(x,-2,2),(y,-2,2),(z,-2,2), plot_points = 75)
show(p)
```

## Options

none

## Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

## Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.

## Attribute

Permalink:

Author:

Date: 22 Jul 2020 17:34

Submitted by: Zane Corbiere