圓柱體與內切球之間的體積
Author: 藍邦偉　老師

單位向量

座標軸

Start

x

y

z

$ O $

$半徑為%v$

$ 圓柱與其內切球間的體積 $

Q_2: 0.3 * Corner[2] + 0.7 * Corner[1]
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
O: 0.5 * (Q_2 + Corner[3])
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 4.276056667386108 rad (slider from 0 to 6.283185307179586, step 0.1*°)
X_{unit}: O + (cos(α), sin(α) * cos(β))
u = Vector(O, X_{unit})
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
v = Vector(O, Y_{unit})
L = 4 (slider from 1 to 10, step 1)
yy = Vector(O - L * v, O + L * v)
zz = Vector(O - L * w, O + L * w)
xx = Vector(O - L * u, O + L * u)
c = false
d = false
Q_3: (x(Q_2), y(Corner[3]))
g = Segment(Q_2, Q_3)
poly1, h, q_1, q_4, i = Polygon(Corner[1], Q_2, Q_3, Corner[4])
r = 2 (slider from 1 to 3, step 1)
m = 0.28 (slider from 0.01 to 1, step 0.01)
list_1 = Sequence(CurveCartesian[x(O + r * cos(t) * cos(s) * u + r * cos(t) * sin(s) * v + r * sin(t) * w), y(O + r * cos(t) * cos(s) * u + r * cos(t) * sin(s) * v + r * sin(t) * w), t, -1.57, 1.57], s, 0, 6.28, m)
n = 0.14 (slider from 0.01 to 1, step 0.01)
list_2 = Sequence(CurveCartesian[x(O + r * cos(t) * cos(s) * u + r * cos(t) * sin(s) * v + r * sin(t) * w), y(O + r * cos(t) * cos(s) * u + r * cos(t) * sin(s) * v + r * sin(t) * w), s, 0, 6.28], t, -1.57, 1.57, n)
c_1 = CurveCartesian(x(O + r * cos(s) * u + r * sin(s) * v - r * w), y(O + r * cos(s) * u + r * sin(s) * v - r * w), s, 0, 6.28319)
c_2 = CurveCartesian(x(O + r * cos(s) * u + r * sin(s) * v + r * w), y(O + r * cos(s) * u + r * sin(s) * v + r * w), s, 0, 6.28319)
ϕ = 1.5707963267948966 rad (slider from 90*° to 270*°, step 0.1*°)
c_3 = CurveCartesian(x(O + r * cos(ϕ) * cos(s) * u + r * cos(ϕ) * sin(s) * v + r * sin(ϕ) * w), y(O + r * cos(ϕ) * cos(s) * u + r * cos(ϕ) * sin(s) * v + r * sin(ϕ) * w), s, 0, 6.28319)
S_1: O - r * w
N_1: O + r * w
U_1: N_1 + (r, 0)
U_2: N_1 - (r, 0)
D_2: S_1 - (r, 0)
D_1: S_1 + (r, 0)
a_1 = Segment(U_1, D_1)
a_2 = Segment(U_2, D_2)
c_4 = CurveCartesian(x(O + r * cos(t) * u + r * sin(t) * v + r * sin(ϕ) * w), y(O + r * cos(t) * u + r * sin(t) * v + r * sin(ϕ) * w), t, 0, 6.283185307179586)