複合多面體(1)
Author: 藍邦偉　老師

單位向量

座標軸

x

y

z

$ 複合多面體(1) $

O = (11.683233291818876, 3.8132324134297417)
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 3.2899456400093112 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 = 1 (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)
c = false
d = false
Q_2: 0.2 * Corner[2] + 0.8 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
z_5 = Segment(Q_2, Q_3)
poly1, z_1, z_3, z_4, z_2 = Polygon(Corner[1], Q_2, Q_3, Corner[4])
z_6 = 2 (slider from 0.1 to 5, step 0.1)
r = 1.7 (slider from 1 to 2, step 0.1)
A_1: O + r * u + r * v + r * w
A_2: O - r * u + r * v + r * w
A_3: O - r * u - r * v + r * w
A_4: O + r * u - r * v + r * w
A_5: O + r * u + r * v - r * w
A_6: O - r * u + r * v - r * w
A_7: O - r * u - r * v - r * w
A_8: O + r * u - r * v - r * w
M_0 = Midpoint(A_1, A_2)
M_1 = Midpoint(A_3, A_2)
M_2 = Midpoint(A_3, A_4)
M_3 = Midpoint(A_1, A_4)
M_4 = Midpoint(A_5, A_6)
M_5 = Midpoint(A_7, A_6)
M_6 = Midpoint(A_7, A_8)
M_7 = Midpoint(A_5, A_8)
M_8 = Midpoint(A_5, A_1)
M_9 = Midpoint(A_2, A_6)
M_{10} = Midpoint(A_3, A_7)
M_{11} = Midpoint(A_4, A_8)
B_1: O + 2 * r * w
B_2: O - 2 * r * w
B_3: O + 2 * r * u
B_4: O - 2 * r * u
B_5: O + 2 * r * v
B_6: O - 2 * r * v
b_1, b_2 = SDLine(A_1, A_5, A_4, A_2)
b_3, b_4 = SDLine(A_3, A_7, A_2, A_4)
b_5, b_6 = SDLine(A_2, A_6, A_1, A_3)
b_7, b_8 = SDLine(A_4, A_8, A_3, A_1)
b_9, b_{10} = SDLine(A_4, A_1, A_8, A_3)
b_{11}, b_{12} = SDLine(A_3, A_4, A_7, A_2)
b_{13}, b_{14} = SDLine(A_2, A_3, A_6, A_1)
b_{15}, b_{16} = SDLine(A_1, A_2, A_5, A_4)
b_{17}, b_{18} = SDLine(A_6, A_7, A_5, A_2)
b_{19}, b_{20} = SDLine(A_7, A_8, A_6, A_3)
b_{21}, b_{22} = SDLine(A_8, A_5, A_7, A_4)
b_{23}, b_{24} = SDLine(A_5, A_6, A_8, A_1)
c_0, c_1 = SDLine(B_1, B_5, B_3, B_4)
c_2, c_3 = SDLine(B_5, B_2, B_3, B_4)
c_4, c_5 = SDLine(B_1, B_3, B_6, B_5)
c_6, c_7 = SDLine(B_3, B_2, B_6, B_5)
c_8, c_9 = SDLine(B_1, B_6, B_4, B_3)
c_{10}, c_{11} = SDLine(B_6, B_2, B_4, B_3)
c_{12}, c_{13} = SDLine(B_1, B_4, B_5, B_6)
c_{14}, a_1 = SDLine(B_4, B_2, B_5, B_6)
c_{15}, c_{16} = SDLine(B_6, B_4, B_1, B_2)
c_{17}, c_{18} = SDLine(B_5, B_4, B_2, B_1)
c_{19}, c_{20} = SDLine(B_5, B_3, B_1, B_2)
c_{21}, c_{22} = SDLine(B_6, B_3, B_2, B_1)
d_0 = Segment(M_0, M_1)
d_1 = Segment(M_2, M_1)
d_2 = Segment(M_2, M_3)
d_3 = Segment(M_0, M_3)
poly02 = Poly_B3(B_1, M_1, M_2)
poly03 = Poly_B3(B_1, M_0, M_1)
poly04 = Poly_B3(B_1, M_3, M_0)
poly05 = Poly_B3(B_1, M_2, M_3)
d_4 = Segment(M_0, M_8)
d_5 = Segment(M_4, M_8)
d_6 = Segment(M_4, M_9)
d_7 = Segment(M_0, M_9)
d_8 = Segment(M_3, M_8)
d_9 = Segment(M_7, M_8)
d_{10} = Segment(M_7, M_{11})
d_{11} = Segment(M_3, M_{11})
d_{12} = Segment(M_2, M_{11})
d_{13} = Segment(M_6, M_{11})
d_{14} = Segment(M_6, M_{10})
d_{15} = Segment(M_2, M_{10})
d_{16} = Segment(M_1, M_{10})
d_{17} = Segment(M_5, M_{10})
d_{18} = Segment(M_9, M_1)
d_{19} = Segment(M_9, M_5)
d_{20} = Segment(M_6, M_5)
d_{21} = Segment(M_5, M_4)
d_{22} = Segment(M_7, M_4)
d_{23} = Segment(M_7, M_6)
poly06 = Poly_B3(M_0, B_5, M_9)
poly07 = Poly_B3(M_1, M_9, B_4)
poly08 = Poly_B3(M_1, B_4, M_{10})
poly09 = Poly_B3(M_2, M_{10}, B_6)
poly10 = Poly_B3(M_3, B_3, M_8)
poly11 = Poly_B3(M_0, M_8, B_5)
poly12 = Poly_B3(M_2, B_6, M_{11})
poly13 = Poly_B3(M_3, M_{11}, B_3)
poly14 = Poly_B3(B_6, M_6, M_{11})
poly15 = Poly_B3(M_{11}, M_7, B_3)
poly16 = Poly_B3(M_7, M_6, B_2)
poly17 = Poly_B3(M_{10}, B_4, M_5)
poly18 = Poly_B3(B_6, M_{10}, M_6)
poly19 = Poly_B3(M_6, M_5, B_2)
poly20 = Poly_B3(B_5, M_4, M_9)
poly21 = Poly_B3(M_5, B_4, M_9)
poly22 = Poly_B3(M_5, M_4, B_2)
poly23 = Poly_B3(M_8, B_3, M_7)
poly24 = Poly_B3(B_5, M_8, M_4)
poly25 = Poly_B3(M_4, M_7, B_2)
poly26, m_{10}, m_2, a_3 = Polygon(M_2, A_3, M_{10})
poly27, m_1, a_7, m_6 = Polygon(A_7, M_6, M_{10})
poly28, a_4, m_3, m_{11} = Polygon(M_2, M_{11}, A_4)
poly29, m_4, a_8, m_5 = Polygon(A_8, M_{11}, M_6)
poly30, m_7, m_8, a_2 = Polygon(M_3, A_4, M_{11})
poly31, m_9, a_5, m_{12} = Polygon(A_8, M_7, M_{11})
poly32, m_{13}, a_6, m_{14} = Polygon(A_1, M_3, M_8)
poly33, m_{15}, m_{16}, a_9 = Polygon(M_7, A_5, M_8)
poly34, m_{17}, m_0, a_{10} = Polygon(M_0, A_1, M_8)
poly35, m_{18}, m_{19}, a_{11} = Polygon(M_8, A_5, M_4)
poly36, a_{12}, m_{20}, m_{21} = Polygon(M_0, M_9, A_2)
poly37, a_{13}, m_{22}, m_{23} = Polygon(M_9, M_4, A_6)
poly38, m_{24}, m_{25}, a_{14} = Polygon(M_1, A_2, M_9)
poly39, e, f, g = Polygon(A_6, M_5, M_9)
poly40, m_{26}, a_{15}, m_{27} = Polygon(A_3, M_1, M_{10})
poly41, m_{28}, m_{29}, a_{16} = Polygon(M_5, A_7, M_{10})
poly42, a_{17}, m_{30}, m_{31} = Polygon(M_2, M_1, A_3)
poly43, m_{32}, m_{33}, a_{18} = Polygon(M_2, A_4, M_3)
poly44, m_{34}, m_{35}, a_{19} = Polygon(M_0, A_2, M_1)
poly45, m_{36}, m_{37}, a_{20} = Polygon(M_3, A_1, M_0)

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')