正四角錐的內切球與外接球
Author: 藍邦偉  老師

x

y

z

單位向量

座標軸

內切球

正四角錐的內切球與外接球

外接球

x

y

z

α = 2.0943951023931953 rad (slider from 0 to 6.283185307179586, step 0.017)
β = 1.7453292519943295 rad (slider from 0 to 6.283185307179586, step 0.017)
O = (8.869707380618795, 2.933703256573416)
X_{unit}: O + (cos(α), sin(α) * cos(β))
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
Z_{unit}: O + (0, sin(β))
u = Vector(O, X_{unit})
v = Vector(O, Y_{unit})
w = Vector(O, Z_{unit})
L = 6 (slider from 1 to 10, step 1)
a = Vector(O - L * v, O + L * v)
b = Vector(O - L * w, O + L * w)
z = Vector(O - L * u, O + L * u)
A_1: O + L * u
B_1: O + L * v
Z: O + L * w
c = false
d_1 = false
Q_2: 0.28 * Corner[2] + 0.72 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
多邊形1, e, q_2, q_3, f = Polygon(Corner[1], Q_2, Q_3, Corner[4])
g = Segment(Q_2, Q_3)
n = 3.6 (slider from 1 to 5, step 0.1)
P_1: O + n * u
P_2: O + n * v
P_3: O - n * u
P_4: O - n * v
P_0: O + n * w
d = 0 (slider from 0 to 2, step 0.1)
O_1: O + n * w * (sqrt(3) - 1) / 2
o = false
P_5: 1 / 3 * (P_1 + P_2 + P_0)
P_6: 1 / 3 * (P_0 + P_2 + P_3)
P_7: 1 / 3 * (P_3 + P_4 + P_0)
P_8: 1 / 3 * (P_4 + P_0 + P_1)
u_1 = Vector(O_1, P_5)
R_0: P_0 + d * u_1
R_1: P_1 + d * u_1
R_2: P_2 + d * u_1
O_2: O_1 + d * u_1
r = Segment(R_0, O_2)
s = Segment(O_2, R_2)
t = Segment(R_1, O_2)
u_2 = Vector(O_1, P_6)
S_0: P_0 + d * u_2
S_2: P_2 + d * u_2
S_3: P_3 + d * u_2
O_3: O_1 + d * u_2
a_1 = Segment(O_3, S_3)
b_1 = Segment(O_3, S_0)
c_1 = Segment(O_3, S_2)
poly2, s_3, s_0, s_2 = Polygon(S_0, S_2, S_3)
u_4 = Vector(O_1, P_8)
T_0: P_0 + d * u_4
T_1: P_1 + d * u_4
T_4: P_4 + d * u_4
C_5: O_1 + d * u_4
e_1 = Segment(C_5, T_1)
f_1 = Segment(C_5, T_4)
g_1 = Segment(C_5, T_0)
poly3, t_1, t_0, t_4 = Polygon(T_0, T_4, T_1)
u_3 = Vector(O_1, P_7)
V_0: P_0 + d * u_3
V_4: P_4 + d * u_3
O_4: O_1 + d * u_3
u_0 = Vector(O_1, O)
W_1: P_1 + d * u_0
W_2: P_2 + d * u_0
W_3: P_3 + d * u_0
W_4: P_4 + d * u_0
C_6: O_1 + d * u_0
k_1 = Segment(C_6, W_1)
l_1 = Segment(C_6, W_2)
m_1 = Segment(C_6, W_4)
n_1 = Segment(C_6, W_3)
poly5, w_1, w_2, w_3, w_4 = Polygon(W_1, W_2, W_3, W_4)
C_1 = Circle(O_1, n * (sqrt(3) - 1) * 0.5)
r_1: 0.5 * (sqrt(3) - 1) * n
o_1 = CurveCartesian(x(O + r_1 * cos(t) * u + r_1 * sin(t) * v + r_1 * w), y(O + r_1 * cos(t) * u + r_1 * sin(t) * v + r_1 * w), t, 0, 6.28319)
poly1, r_2, r_0, r_3 = Polygon(R_0, R_2, R_1)
V_3: P_3 + d * u_3
h_1 = Segment(V_0, O_4)
i_1 = Segment(O_4, V_4)
j_1 = Segment(O_4, V_3)
poly4, v_4, v_0, v_3 = Polygon(V_0, V_3, V_4)
R: n - r_1
p_1 = true
q_1 = Circle(O, n)
s_1 = CurveCartesian(x(O + n * cos(θ) * u + n * sin(θ) * v), y(O + n * cos(θ) * u + n * sin(θ) * v), θ, 0, 6.283185307179586)
m, a_2 = SDLine(P_0, P_3, P_4, P_2)
p, b_2 = SDLine(P_0, P_4, P_1, P_3)
l, c_2 = SDLine(P_0, P_1, P_2, P_4)
q, d_2 = SDLine(P_0, P_2, P_3, P_1)
h, e_2 = SDLine(P_1, P_4, P_2, P_0)
k, h_2 = SDLine(P_4, P_3, P_2, P_0)
i, j = SDLine(P_3, P_2, P_4, P_0)
f_2, g_2 = SDLine(P_1, P_2, P_0, P_4)
i_3 = Segment(P_0, O)

Tool: SDLine
Input: A, B, C, D
Output: g, h

b: sgn(sin(Angle[D, B, A]))
a: sgn(sin(Angle[A, B, C]))
c: sgn(a + b + 0.5)
d: sqrt(c)
e: sqrt(-c)
E = Midpoint(A, B)
A' = Dilate(A, d, E)
B' = Dilate(B, d, E)
g = Segment(A', B')
A'_1 = Dilate(A, e, E)
B'_1 = Dilate(B, e, E)
h = Segment(A'_1, B'_1)