kent:muraki 2015

cubic

hyp(x) = 1 / x
a = 5 (slider from -10 to 10, step 0.05)
b = 3 (slider from 0 to 5, step 0.05)
c = 6 (slider from 0 to 10, step 0.05)
B: (0, b)
C: (c, b)
A: (-a, b)
O = Intersect(xAxis, yAxis)
oc = Ray(O, C)
C_1 = Intersect(hyp, oc, (1.4142135623722911, 0.7071067811869495))
oa = Ray(O, A)
d = Line(C_1, xAxis)
A_1 = Intersect(d, oa)
B_1 = Intersect(d, yAxis)
mdpt = Midpoint(A_1, C_1)
ra = Segment(mdpt, C_1)
Cp(x) = y(mdpt) + sqrt(ra^(2) - (x - x(mdpt))^(2))
X_2 = Intersect(hyp, Cp, 0, x(C_1) - 0.0010)
X_1: (x(X_2), y(C_1))
ox = Ray(O, X_1)
f = Segment(A, C)
X = Intersect(ox, f)
p(x) = x^(3) + a * x^(2) + b^(2) * (x - c)
Cn(x) = y(mdpt) - sqrt(ra^(2) - (x - x(mdpt))^(2))
Z_2, Y_2 = Intersect(hyp, Cn, x(A), 0)
D: (0, y(X_2))
R = Intersect(p, 0 * p(x), 0, x(C))
e = Segment(D, X_2)
g = Segment(X_2, X_1)
h = Segment(C_1, B_1)
i = Segment(A_1, B_1)
j = Segment(O, A)
k = Segment(O, C)
l = Segment(O, X)
m = Segment(A_1, A)
n = Segment(X_1, X)
q = Segment(C_1, C)
Y_1: (x(Y_2), y(C_1))
R_2, R_1 = Intersect(p, 0 * p(x), -20, 0)
Z_1: (x(Z_2), y(C_1))
r = Ray(O, Y_1)
s = Ray(O, Z_1)
Y = Intersect(r, f)
Z = Intersect(f, s)
t = Segment(O, Y)
a_1 = Segment(O, Z)
text1: "p(x) = x^3 + " + (LaTeX[a]) + " x^2 +" + (LaTeX[b]) + "^2 (x-" + (LaTeX[c]) + ")"
b_1 = Segment(O, B_1)
showCubic = false