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

$α=%v$

$β=%v$

$O$

$A_1$

$A_5$

單位向量

座標軸

x

y

z

$ O $

$A_2$

$A_3$

$A_4$

$A_6$

$B_1$

$B_2$

$B_3$

$B_4$

$Step=%v$

$t7=%v$

$作正四面體B_1B_2B_2B_4$

$分別取六邊的中點A_1,A_2,A_3,A_4,A_5,A_6$

$將六邊中點連起來，\;得一正八面體$

$是一個真的正八面體$

$拉動\;α\;與\;β\;觀察$

$拉動四個滑竿t61,t62,t63,t64$

t3 = 0 (slider from 0 to 1, step 0.01)
α = 3.6826447217080354 rad (slider from 0 to 6.283185307179586, step 0.1*°)
β = 1.361356816555577 rad (slider from 0 to 6.283185307179586, step 0.1*°)
O = (10.482842504682536, 3.1244260192728994)
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
v = Vector(O, Y_{unit})
X_{unit}: O + (cos(α), sin(α) * cos(β))
u = Vector(O, X_{unit})
A_1: O + u + v
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
A_5: O + sqrt(2) * w
L = 2 (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.3 * Corner[2] + 0.7 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
poly1_1, q_3, q_1, q_4, q_2 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
A_2: O - u + v
A_3: O - u - v
A_4: O + u - v
A_6: O - sqrt(2) * w
B_1: O + 2 * u - sqrt(2) * w
B_2: O + 2 * v + sqrt(2) * w
B_3: O - 2 * v + sqrt(2) * w
B_4: O - 2 * u - sqrt(2) * w
a_1, a_2 = SDLine(B_2, B_3, B_4, B_1)
a_3, a_4 = SDLine(B_3, B_4, B_2, B_1)
a_5, a_6 = SDLine(B_3, B_1, B_4, B_2)
a_7, a_8 = SDLine(B_1, B_4, B_3, B_2)
a_9, a_{10} = SDLine(B_2, B_1, B_3, B_4)
a_{11}, a_{12} = SDLine(B_2, B_4, B_1, B_3)
n = 0 (slider from 0 to 7, step 1)
poly2 = Poly_G3(B_2, B_4, B_3)
poly3 = Poly_G3(B_2, B_1, B_4)
poly1 = Poly_G3(B_3, B_1, B_2)
poly4 = Poly_G3(B_3, B_4, B_1)
C_2: A_5 + t3 * Vector[A_5, A_2]
C_3: A_5 + t3 * Vector[A_5, A_3]
C_4: A_5 + t3 * Vector[A_5, A_4]
C_6: A_6 + t3 * Vector[A_6, A_2]
C_5: A_6 + t3 * Vector[A_6, A_1]
C_7: A_6 + t3 * Vector[A_6, A_3]
C_8: A_6 + t3 * Vector[A_6, A_4]
C_1: A_5 + t3 * Vector[A_5, A_1]
b_1 = Segment(A_5, C_1)
b_2 = Segment(A_5, C_2)
b_3 = Segment(A_5, C_3)
b_4 = Segment(A_5, C_4)
b_5 = Segment(A_6, C_5)
b_6 = Segment(A_6, C_6)
b_7 = Segment(A_6, C_7)
b_8 = Segment(A_6, C_8)
D_1: A_1 + t3 * Vector[A_1, A_2]
D_2: A_2 + t3 * Vector[A_2, A_3]
D_3: A_3 + t3 * Vector[A_3, A_4]
D_4: A_4 + t3 * Vector[A_4, A_1]
c_1 = Segment(A_1, D_1)
c_2 = Segment(A_2, D_2)
c_3 = Segment(A_3, D_3)
c_4 = Segment(A_4, D_4)
polya = Poly_G3(A_5, A_4, A_1)
polyb = Poly_G3(A_5, A_1, A_2)
polyc = Poly_G3(A_5, A_2, A_3)
polyd = Poly_G3(A_5, A_3, A_4)
polye = Poly_G3(A_3, A_6, A_4)
polyf = Poly_G3(A_2, A_6, A_3)
polyg = Poly_G3(A_1, A_6, A_2)
polyh = Poly_G3(A_1, A_4, A_6)
d_1, d_2 = SDLine(A_5, A_4, A_3, A_1)
d_3, d_4 = SDLine(A_5, A_1, A_4, A_2)
d_5, d_6 = SDLine(A_5, A_3, A_2, A_4)
d_7, d_8 = SDLine(A_5, A_2, A_1, A_3)
d_9, d_{10} = SDLine(A_4, A_6, A_3, A_1)
d_{11}, d_{12} = SDLine(A_1, A_6, A_4, A_2)
d_{13}, d_{14} = SDLine(A_3, A_6, A_2, A_4)
d_{15}, d_{16} = SDLine(A_2, A_6, A_1, A_3)
d_{17}, d_{18} = SDLine(A_1, A_2, A_6, A_5)
d_{19}, d_{20} = SDLine(A_2, A_3, A_6, A_5)
d_{21}, d_{22} = SDLine(A_4, A_1, A_6, A_5)
d_{23}, d_{24} = SDLine(A_3, A_4, A_6, A_5)
t61 = 0 (slider from 0 to 1, step 0.101)
E_4: A_4 + t61 * Vector[O, B_1]
E_B: B_1 + t61 * Vector[O, B_1]
E_6: A_6 + t61 * Vector[O, B_1]
t62 = 0 (slider from 0 to 1, step 0.01)
t63 = 0 (slider from 0 to 1, step 0.01)
t64 = 0 (slider from 0 to 1, step 0.01)
F_2: A_2 + t62 * Vector[O, B_2]
F_1: A_1 + t62 * Vector[O, B_2]
F_B: B_2 + t62 * Vector[O, B_2]
F_5: A_5 + t62 * Vector[O, B_2]
G_5: A_5 + t63 * Vector[O, B_3]
G_3: A_3 + t63 * Vector[O, B_3]
G_4: A_4 + t63 * Vector[O, B_3]
G_B: B_3 + t63 * Vector[O, B_3]
H_2: A_2 + t64 * Vector[O, B_4]
H_3: A_3 + t64 * Vector[O, B_4]
H_6: A_6 + t64 * Vector[O, B_4]
H_B: B_4 + t64 * Vector[O, B_4]
poly_2 = Poly_G3(H_3, H_B, H_6)
poly_1 = Poly_G3(H_3, H_2, H_B)
poly_3 = Poly_G3(H_2, H_6, H_B)
poly_4 = Poly_G3(H_2, H_3, H_6)
E_1: A_1 + t61 * Vector[O, B_1]
poly_5 = Poly_G3(E_1, E_B, E_6)
poly_6 = Poly_G3(E_4, E_B, E_1)
poly_7 = Poly_G3(E_4, E_6, E_B)
poly_8 = Poly_G3(E_1, E_6, E_4)
poly_9 = Poly_G3(F_B, F_5, F_1)
poly_{10} = Poly_G3(F_5, F_2, F_1)
poly_{11} = Poly_G3(F_B, F_1, F_2)
poly_{12} = Poly_G3(F_5, F_B, F_2)
poly_{13} = Poly_G3(G_B, G_3, G_4)
poly_{14} = Poly_G3(G_5, G_3, G_B)
poly_{15} = Poly_G3(G_5, G_B, G_4)
poly_{16} = Poly_G3(G_5, G_4, G_3)
t7 = 0 (slider from 0 to 1, step 0.01)
K_1: A_1 + t7 * Vector[O, A_6]
K_2: A_2 + t7 * Vector[O, A_6]
K_3: A_3 + t7 * Vector[O, A_6]
K_4: A_4 + t7 * Vector[O, A_6]
K_6: A_6 + t7 * Vector[O, A_6]
e_1, e_2 = SDLine(K_1, K_6, K_4, K_2)
e_3, e_4 = SDLine(K_2, K_6, K_1, K_3)
e_5, e_6 = SDLine(K_3, K_6, K_2, K_4)
e_7, e_8 = SDLine(K_4, K_6, K_3, K_1)
e_9, e_{10} = SDLine(K_1, K_2, K_6, K_4)
e_{11}, e_{12} = SDLine(K_2, K_3, K_6, K_4)
e_{13}, e_{14} = SDLine(K_3, K_4, K_6, K_1)
e_{15}, e_{16} = SDLine(K_4, K_1, K_6, K_3)

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)