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

$O$

單位向量

座標軸

x

y

z

$Step=%v$

$正四面體的內切球$

O = (17.024514125368558, 1.8761087976292194)
β = 1.3089969389957472 rad (slider from 0 to 6.283185307179586, step 0.1*°)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 4.50294947014537 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)
z_c = false
z_a = 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)
θ1 = 0 rad (slider from 0 to 6.283185307179586, step 0.1*°)
A_4: O + 3 * w
A_1: O + 2 * sqrt(2) * cos(θ1) * u + 2 * sqrt(2) * sin(θ1) * v - w
A_2: O + 2 * sqrt(2) * cos(θ1 + 120°) * u + 2 * sqrt(2) * sin(θ1 + 120°) * v - w
A_3: O + 2 * sqrt(2) * cos(θ1 + 240°) * u + 2 * sqrt(2) * sin(θ1 + 240°) * v - w
a_1, a_2 = SDLine(A_4, A_3, A_2, A_1)
a_5, a_6 = SDLine(A_4, A_1, A_3, A_2)
a_3, a_4 = SDLine(A_4, A_2, A_1, A_3)
a_7, a_8 = SDLine(A_2, A_1, A_4, A_3)
a_9, a_{10} = SDLine(A_1, A_3, A_4, A_2)
a_{11}, a_{12} = SDLine(A_3, A_2, A_4, A_1)
poly2 = Poly_G3(A_4, A_3, A_1)
poly1 = Poly_G3(A_4, A_1, A_2)
poly3 = Poly_G3(A_4, A_2, A_3)
poly4 = Poly_G3(A_3, A_2, A_1)
G_{124}: 1 / 3 * (A_1 + A_2 + A_4)
G_{234}: 1 / 3 * (A_3 + A_2 + A_4)
G_{134}: 1 / 3 * (A_3 + A_1 + A_4)
G_{123}: 1 / 3 * (A_3 + A_1 + A_2)
G: O
t3 = 0 (slider from 0 to 3, step 0.01)
G_2: G + t3 * Vector[G, G_{134}]
B_1: A_1 + t3 * Vector[G, G_{134}]
B_3: A_3 + t3 * Vector[G, G_{134}]
B_4: A_4 + t3 * Vector[G, G_{134}]
G_3: G + t3 * Vector[G, G_{124}]
C_1: A_1 + t3 * Vector[G, G_{124}]
C_2: A_2 + t3 * Vector[G, G_{124}]
C_4: A_4 + t3 * Vector[G, G_{124}]
G_4: G + t3 * Vector[G, G_{123}]
D_1: A_1 + t3 * Vector[G, G_{123}]
D_2: A_2 + t3 * Vector[G, G_{123}]
D_3: A_3 + t3 * Vector[G, G_{123}]
G_1: G + t3 * Vector[G, G_{234}]
E_2: A_2 + t3 * Vector[G, G_{234}]
E_3: A_3 + t3 * Vector[G, G_{234}]
E_4: A_4 + t3 * Vector[G, G_{234}]
c_1 = Segment(G_2, B_1)
c_2 = Segment(G_2, B_3)
c_3 = Segment(G_2, B_4)
d_1 = Segment(C_4, G_3)
d_2 = Segment(C_1, G_3)
d_3 = Segment(C_2, G_3)
e_1 = Segment(D_1, G_4)
e_2 = Segment(D_2, G_4)
e_3 = Segment(D_3, G_4)
f_1 = Segment(G_1, E_4)
f_2 = Segment(G_1, E_2)
f_3 = Segment(G_1, E_3)
trig_a, b_5, b_6, b_7 = Polygon(B_1, B_3, B_4)
trig_b, c_4, c_5, c_6 = Polygon(C_1, C_2, C_4)
trig_d, e_4, e_5, e_6 = Polygon(E_3, E_2, E_4)
trig_c, d_4, d_5, d_6 = Polygon(D_3, D_2, D_1)
G_C: 1 / 3 * (C_1 + C_2 + C_4)
G_B: 1 / 3 * (B_1 + B_3 + B_4)
G_E: 1 / 3 * (E_2 + E_3 + E_4)
G_D: 1 / 3 * (D_2 + D_3 + D_1)
g_1 = Segment(G_1, G_E)
g_2 = Segment(G_B, G_2)
g_3 = Segment(G_C, G_3)
g_4 = Segment(G_D, G_4)
b_1 = Segment(G_E, G_1)
b_2 = Segment(G_B, G_2)
b_3 = Segment(G_C, G_3)
b_4 = Segment(G_D, G_4)
θ4 = 0 rad (slider from 0 to 70.52877937*°, step 0.1*°)
H_1: G_1 - (2 * sqrt(2) / 3 * cos(θ4) - 1 / 3 * sin(θ4)) * u + (1 / 3 * cos(θ4) - 2 * sqrt(2) / 3 * sin(θ4)) * w
R_a: G_1 + sqrt(6) * v
H_2: R_a + (-sqrt(2) * cos(θ4) - sin(θ4)) * u + (-cos(θ4) - sqrt(2) * sin(θ4)) * w
R_b: G_1 - sqrt(6) * v
H_3: R_b + (-sqrt(2) * cos(θ4) - sin(θ4)) * u + (-cos(θ4) - sqrt(2) * sin(θ4)) * w
H_4: G_1 - 3 * sin(θ4) * u + 3 * cos(θ4) * w
d = Circle(O, 1)
d_d = CurveCartesian(x(O + cos(t) * u + sin(t) * v), y(O + cos(t) * u + sin(t) * v), t, 0, 6.283185307179586)

Tool: Poly_G3
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: 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)