Hyperboloid
Author: Joseph Lo

Curve at x = a

Curve at y = b

Level Curves at z = c

The surface

k = 0 (slider from -1 to 1, step 0.05)
rmin = Max(0, (sgn(k) * sqrt(abs(k))))
c = 0 (slider from -2 to 2, step 0.1)
zr: sqrt(Max[k + c^(2), 0])
a = 0 (slider from -2.5 to 2.5, step 0.1)
tmaxx12 = Max(0, (sgn(4 - a^(2) + k) * sqrt(abs(4 - a^(2) + k))))
xCurve1 = CurveCartesian(a, t, sqrt(abs(a^(2) + t^(2) - k)), t, (-tmaxx12), tmaxx12)
tmaxx34 = 2
xCurve2 = CurveCartesian(a, t, (-sqrt(abs(a^(2) + t^(2) - k))), t, (-tmaxx12), tmaxx12)
xCurve4 = CurveCartesian(a, (-sqrt(abs((-a^(2)) + t^(2) + k))), t, t, (-tmaxx34), tmaxx34)
zCurve = CurveCartesian((zr * cos(t)), (zr * sin(t)), c, t, -3.141592653589793, 3.141592653589793)
rmax: sqrt(k + 4)
S1 = Surface((r * cos(t)), (r * sin(t)), sqrt(r^(2) - k), r, rmin, rmax, t, -3.14159, 3.141592653589793)
S2 = Surface((r * cos(t)), (r * sin(t)), (-sqrt(r^(2) - k)), r, rmin, rmax, t, -3.14159, 3.141592653589793)
xPlane = Surface(a, s, t, s, -2.5, 2.5, t, -2, 2)
xCurve3 = CurveCartesian(a, sqrt(abs((-a^(2)) + t^(2) + k)), t, t, (-tmaxx34), tmaxx34)
b = 0 (slider from -2.5 to 2.5, step 0.1)
tmaxy34 = 2
yPlane = Surface(s, b, t, s, -2.5, 2.5, t, -2, 2)
tmaxy12 = Max(0, (sgn((-b^(2)) + 4 + k) * sqrt(abs((-b^(2)) + 4 + k))))
yCurve1 = CurveCartesian(t, b, sqrt(abs(t^(2) + b^(2) - k)), t, (-tmaxy12), tmaxy12)
yCurve2 = CurveCartesian(t, b, (-sqrt(abs(t^(2) + b^(2) - k))), t, (-tmaxy12), tmaxy12)
yCurve3 = CurveCartesian(sqrt(abs((-b^(2)) + t^(2) + k)), b, t, t, (-tmaxy34), tmaxy34)
yCurve4 = CurveCartesian((-sqrt(abs((-b^(2)) + t^(2) + k))), b, t, t, (-tmaxy34), tmaxy34)
xcheck = false
ycheck = false
zcheck = false
surfacecheck = true
text1: "x^2 + y^2 - z^2 = " + (LaTeX[k]) + ""
text4: "Level curve at z = " + c + ""
zPlane = Surface(s, t, c, s, -2.5, 2.5, t, -2.5, 2.5)
text2: "Traces along x = " + a + ""
text3: "Traces along y = " + b + ""