Author: 藍邦偉　老師
Date: 26 3 月 2014

$O$

單位向量

座標軸

x

y

z

$ O $

$Step=%v$

$正四角錐的內切球$

O = (14.378359334275467, 2.3051211505179987)
β = 1.3089969389957472 rad (slider from 0 to 6.283185307179586, step 0.1*°)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
B_1: O + (sqrt(6) - sqrt(2)) / 2 * w
α = 2.0943951023931953 rad (slider from 0 to 6.283185307179586, step 0.1*°)
X_{unit}: O + (cos(α), sin(α) * cos(β))
u = Vector(O, X_{unit})
u_3: -sqrt(2) * u + w
t3 = 0 (slider from 0 to 1, step 0.01)
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
v = Vector(O, Y_{unit})
u_2: -sqrt(2) * v + w
A_5: O + sqrt(2) * w
u_1: sqrt(2) * u + w
t1 = 0 rad (slider from 0 to 6.283185307179586, step 0.1*°)
A_1: O + sqrt(2) * cos(45° + t1) * u + sqrt(2) * sin(45° + t1) * v
u_0: sqrt(2) * v + w
L = 1 (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_2: 0.25 * Corner[2] + 0.75 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
poly1_1, q_2, q_1, q_4, q_3 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
n = 0 (slider from 0 to 3, step 1)
A_2: O + sqrt(2) * cos(135° + t1) * u + sqrt(2) * sin(135° + t1) * v
A_3: O + sqrt(2) * cos(225° + t1) * u + sqrt(2) * sin(225° + t1) * v
A_4: O + sqrt(2) * cos(315° + t1) * u + sqrt(2) * sin(315° + t1) * v
a_1, a_2 = SDLine(A_5, A_1, A_4, A_2)
a_3, a_4 = SDLine(A_5, A_2, A_1, A_3)
a_5, a_6 = SDLine(A_5, A_3, A_2, A_4)
a_7, a_8 = SDLine(A_5, A_4, A_3, A_1)
a_9, a_{10} = SDLine(A_1, A_2, A_4, A_5)
a_{11}, a_{12} = SDLine(A_2, A_3, A_1, A_5)
a_{13}, a_{14} = SDLine(A_3, A_4, A_2, A_5)
a_{15}, a_{16} = SDLine(A_4, A_1, A_3, A_5)
poly1 = Poly_P3(A_5, A_4, A_1)
poly2 = Poly_P3(A_5, A_1, A_2)
poly3 = Poly_P3(A_5, A_3, A_4)
poly4 = Poly_P3(A_5, A_2, A_3)
poly5 = Poly_G4(A_2, A_1, A_4, A_3)
B_{125}: O + (3 - sqrt(3)) / 3 * v + sqrt(6) / 3 * w
B_{235}: O - (3 - sqrt(3)) / 3 * u + sqrt(6) / 3 * w
B_{345}: O - (3 - sqrt(3)) / 3 * v + sqrt(6) / 3 * w
B_{145}: O + (3 - sqrt(3)) / 3 * u + sqrt(6) / 3 * w
B_{1234}: O
C_6: B_{1234} + t3 * Vector[B_1, B_{1234}]
C_5: B_1 + t3 * Vector[B_1, B_{1234}]
C_4: A_4 + t3 * Vector[B_1, B_{1234}]
C_3: A_3 + t3 * Vector[B_1, B_{1234}]
C_2: A_2 + t3 * Vector[B_1, B_{1234}]
C_1: A_1 + t3 * Vector[B_1, B_{1234}]
D_4: A_4 + t3 * u_2
c_1 = Segment(C_5, C_6)
Poly_a, z_3, z_4, z_1, z_2 = Polygon(C_1, C_2, C_3, C_4)
D_3: A_3 + t3 * u_2
D_5: A_5 + t3 * u_2
Poly_b, z_6, z_5, z_7 = Polygon(D_3, D_5, D_4)
D_2: B_{345} + t3 * u_2
D_1: B_1 + t3 * u_2
c_2 = Segment(D_2, D_1)
E_1: A_1 + t3 * u_0
E_2: A_2 + t3 * u_0
E_5: A_5 + t3 * u_0
E_3: B_1 + t3 * u_0
E_4: B_{125} + t3 * u_0
c_3 = Segment(E_3, E_4)
Poly_e, z_9, z_8, z_{10} = Polygon(E_1, E_5, E_2)
F_4: A_4 + t3 * u_1
F_5: A_5 + t3 * u_1
F_2: B_1 + t3 * u_1
F_3: B_{145} + t3 * u_1
F_1: A_1 + t3 * u_1
Poly_f, z_{12}, z_{11}, z_{13} = Polygon(F_1, F_5, F_4)
c_4 = Segment(F_3, F_2)
H_5: A_5 + t3 * u_3
H_2: A_2 + t3 * u_3
H_3: A_3 + t3 * u_3
H_4: B_{235} + t3 * u_3
H_1: B_1 + t3 * u_3
c_5 = Segment(H_1, H_4)
Poly_h, z_{15}, z_{14}, z_{16} = Polygon(H_2, H_5, H_3)
C_c = Circle(B_1, 0.5176380902050414)
r_1 = 0.5176380902050414
a = 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)
d_1 = Segment(C_5, C_1)
d_2 = Segment(C_5, C_2)
d_3 = Segment(C_5, C_3)
d_4 = Segment(C_5, C_4)
e_1 = Segment(D_1, D_3)
e_2 = Segment(D_1, D_4)
e_3 = Segment(D_1, D_5)
f_1 = Segment(E_3, E_5)
f_2 = Segment(E_3, E_1)
f_3 = Segment(E_3, E_2)
g_1 = Segment(F_2, F_1)
g_2 = Segment(F_2, F_4)
g_3 = Segment(F_2, F_5)
h_1 = Segment(H_1, H_2)
h_2 = Segment(H_1, H_3)
h_3 = Segment(H_1, H_5)

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)

Tool: Poly_B3
Input: A, B, C
Output: poly1'

α = Angle(C, B, A)
d: sqrt(sgn(sin(α)))
A' = Dilate(A, d, A)
B' = Dilate(B, d, A)
C' = Dilate(C, d, A)
poly1', c', a', b' = Polygon(A', B', C')

Tool: Poly_P3
Input: A, B, C
Output: poly1

poly1 = Poly_B3(A, B, C)

Tool: Poly_G4
Input: A, B, C, D
Output: poly1'

α = Angle(C, B, A)
a: sqrt(sgn(sin(α)))
A' = Dilate(A, a, B)
B' = Dilate(B, a, B)
C' = Dilate(C, a, B)
D' = Dilate(D, a, B)
poly1', a', b', c', d' = Polygon(A', B', C', D')