Quadric Surface
Author: Joseph Lo

You saw all the possibilities 
for a ≥ 0. Can you determine
all the possible shapes of
the surface if a < 0?

Question

A sphere

An ellipsoid

A cylinder

An elliptic cylinder

Two parallel planes

A hyperbolic cylinder

A hyperboloid of one sheet

A hyperboloid of two sheets

Empty

c = 1 (slider from -1 to 4, step 0.1)
a = 1 (slider from 0 to 4, step 0.1)
b = 1 (slider from -1 to 4, step 0.1)
text1: "ax^2 + by^2 + cz^2 = " + (LaTeX[1]) + ""
ra = Max(0.31622776601683794, sqrt(abs(a)))
rb = Max(0.31622776601683794, sqrt(abs(b)))
rc = Max(0.31622776601683794, sqrt(abs(c)))
pos: (b > 0) ∧ (c > 0)
E1 = If(pos, (sin(x) * cos(y)), (sqrt(x^(2) + 1) * cos(y)))
E2 = If(pos, (sin(x) * sin(y)), (sqrt(x^(2) + 1) * sin(y)))
E3 = If(pos, cos(x), x)
smax = If(pos, 3.141592653589793, (4 * rc))
smin = If(pos, 0, (-4 * rc))
Hyperboloidz = Surface(E1(s, t) / ra, E2(s, t) / rb, E3(s) / rc, s, smin, smax, t, -3.14159, 3.141592653589793)
Cylinderz = Surface(cos(t) / ra, sin(t) / rb, s, s, -4, 4, t, -3.14159, 3.141592653589793)
Planex1 = Surface(1 / ra, s, t, s, -4, 4, t, -4, 4)
Planex2 = Surface(-1 / ra, s, t, s, -4, 4, t, -4, 4)
Cylindery = Surface(sin(t) / ra, s, cos(t) / rc, s, -4, 4, t, -3.141592653589793, 3.141592653589793)
Hyperbolay2 = Surface(((-sqrt(1 + t^(2)))) / ra, s, t / rc, s, -4, 4, t, (-4 * rc), (4 * rc))
n0: b ≟ 0 + c ≟ 0
quescheck = false
Hyperbolay1 = Surface(sqrt(1 + t^(2)) / ra, s / rb, t / rc, s, (-4 * rb), (4 * rb), t, (-4 * rc), (4 * rc))
Hyperboloid1 = Surface(sqrt(1 + s^(2) + t^(2)) / ra, t / rb, s / rc, s, (-4 * rc), (4 * rc), t, (-4 * rb), (4 * rb))
Hyperboloid2 = Surface(((-sqrt(1 + s^(2) + t^(2)))) / ra, t / rb, s / rc, s, (-4 * rc), (4 * rc), t, (-4 * rb), (4 * rb))
Hyperbolaz2 = Surface(((-sqrt(1 + t^(2)))) / ra, t / rb, s, s, -4, 4, t, (-4 * rb), (4 * rb))
Hyperbolaz1 = Surface(sqrt(1 + t^(2)) / ra, t / rb, s, s, -4, 4, t, (-4 * rb), (4 * rb))
Hyperboloidy = Surface(E2(s, t) / ra, E3(s) / rb, E1(s, t) / rc, s, (-4 * rb), (4 * rb), t, -3.141592653589793, 3.141592653589793)
A = (1.8507442867706443, 0.8970238943214366)
B = (2.6856562561630657, 0.8970238943214366)
d = Line(A, B)
C: (0.5 * A) + (0.5 * B)
numpos: floor((sgn(a) + 1) / 2) + floor((sgn(b) + 1) / 2) + floor((sgn(c) + 1) / 2)
numneg: floor(((-sgn(a)) + 1) / 2) + floor(((-sgn(b)) + 1) / 2) + floor(((-sgn(c)) + 1) / 2)
numzero: 3 - numpos - numneg
same3: a ≟ b ∧ a ≟ c
same2: (a ≟ b ∨ a ≟ c ∨ b ≟ c) ∧ (¬same3)
Cylinderx = Surface(s, sin(t) / rb, cos(t) / rc, s, -4, 4, t, -3.141592653589793, 3.141592653589793)
Planez1 = Surface(s, t, 1 / rc, s, -4, 4, t, -4, 4)
Planez2 = Surface(s, t, -1 / rc, s, -4, 4, t, -4, 4)
Planey1 = Surface(s, 1 / rb, t, s, -4, 4, t, -4, 4)
Planey2 = Surface(s, -1 / rb, t, s, -4, 4, t, -4, 4)
Hyperbolayz1 = Surface(s / ra, sqrt(1 + t^(2)) / rb, t / rc, s, (-4 * ra), (4 * ra), t, (-4 * rc), (4 * rc))
Hyperbolayz2 = Surface(s / ra, ((-sqrt(1 + t^(2)))) / rb, t / rc, s, (-4 * ra), (4 * ra), t, (-4 * rc), (4 * rc))
Hyperbolazy2 = Surface(s / ra, t / rb, ((-sqrt(1 + t^(2)))) / rc, s, (-4 * ra), (4 * ra), t, (-4 * rb), (4 * rb))
Hyperbolazy1 = Surface(s / ra, t / rb, sqrt(1 + t^(2)) / rc, s, (-4 * ra), (4 * ra), t, (-4 * rb), (4 * rb))
e = 0 (slider from 0 to 0, step 0.1)