Author: 藍邦偉　老師

單位向量

座標軸

x

y

z

$ 截正六面體 $

O = (9.89231083801079, 3.6194995455815957)
β = 1.3089969389957472 rad (slider from 0 to 6.283185307179586, step 0.017)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 2.466150233067988 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 = 5 (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]))
g = Segment(Q_2, Q_3)
poly1, h, q_1, q_4, i = Polygon(Corner[1], Q_2, Q_3, Corner[4])
x_1 = 1 (slider from 0.1 to 5, step 0.1)
x_2 = 2 (slider from 0.1 to 5, step 0.1)
x_3 = 1 (slider from 0.1 to 5, step 0.1)
y_1 = 1 (slider from 0.1 to 5, step 0.1)
y_2 = 1 (slider from 0.1 to 5, step 0.1)
y_3 = 1 (slider from 0.1 to 5, step 0.1)
z_1 = 1 (slider from 0.1 to 5, step 0.1)
z_2 = 2 (slider from 0.1 to 5, step 0.1)
r = 2.6 (slider from -5 to 5, step 0.1)
A_3: O - r * u - r * v - r * w
A_4: O + r * u - r * v - r * w
A_2: O - r * u + r * v - r * w
A_1: O + r * u + r * v - r * w
A_5: A_1 + 2 * r * w
A_6: A_2 + 2 * r * w
A_7: A_3 + 2 * r * w
A_8: A_4 + 2 * r * w
t = 0 (slider from 0 to 0.5, step 0.01)
B_1: A_1 + t * Vector[A_1, A_5]
B_2: A_2 + t * Vector[A_1, A_5]
B_3: A_3 + t * Vector[A_1, A_5]
B_4: A_4 + t * Vector[A_1, A_5]
B_5: A_5 - t * Vector[A_1, A_5]
B_6: A_6 - t * Vector[A_1, A_5]
B_7: A_7 - t * Vector[A_1, A_5]
B_8: A_8 - t * Vector[A_1, A_5]
C_1: A_1 + t * Vector[A_1, A_2]
C_4: A_4 + t * Vector[A_1, A_2]
C_5: A_5 + t * Vector[A_1, A_2]
C_8: A_8 + t * Vector[A_1, A_2]
C_2: A_2 - t * Vector[A_1, A_2]
C_3: A_3 - t * Vector[A_1, A_2]
C_6: A_6 - t * Vector[A_1, A_2]
C_7: A_7 - t * Vector[A_1, A_2]
D_1: A_1 + t * Vector[A_1, A_4]
D_2: A_2 + t * Vector[A_1, A_4]
D_5: A_5 + t * Vector[A_1, A_4]
D_6: A_6 + t * Vector[A_1, A_4]
D_4: A_4 - t * Vector[A_1, A_4]
D_3: A_3 - t * Vector[A_1, A_4]
D_7: A_7 - t * Vector[A_1, A_4]
D_8: A_8 - t * Vector[A_1, A_4]
poly2 = Poly_B3(C_5, D_5, B_5)
poly3 = Poly_B3(C_6, B_6, D_6)
poly4 = Poly_B3(D_7, B_7, C_7)
poly5 = Poly_B3(D_8, C_8, B_8)
poly6 = Poly_B3(B_4, C_4, D_4)
poly7 = Poly_B3(B_1, D_1, C_1)
poly8 = Poly_B3(B_2, C_2, D_2)
poly9 = Poly_B3(B_3, D_3, C_3)
poly10 = Poly_R8(D_7, D_6, B_6, B_2, D_2, D_3, B_3, B_7)
poly11 = Poly_R8(C_8, C_7, B_7, B_3, C_3, C_4, B_4, B_8)
poly12 = Poly_R8(C_6, C_5, B_5, B_1, C_1, C_2, B_2, B_6)
poly13 = Poly_R8(D_5, D_8, B_8, B_4, D_4, D_1, B_1, B_5)
poly14 = Poly_R8(D_5, C_5, C_6, D_6, D_7, C_7, C_8, D_8)
poly15 = Poly_R8(C_1, D_1, D_4, C_4, C_3, D_3, D_2, C_2)
a_1 = Segment(A_1, A_2)
a_2 = Segment(A_3, A_2)
a_3 = Segment(A_3, A_4)
a_4 = Segment(A_1, A_4)
a_5 = Segment(A_5, A_6)
a_6 = Segment(A_7, A_6)
a_7 = Segment(A_7, A_8)
a_8 = Segment(A_5, A_8)
a_9 = Segment(A_5, A_1)
a_0 = Segment(A_6, A_2)
a_{10} = Segment(A_3, A_7)
a_{11} = Segment(A_4, A_8)
b_0 = Segment(C_1, C_2)
b_1 = Segment(D_3, D_2)
b_2 = Segment(C_3, C_4)
b_3 = Segment(D_1, D_4)
b_4 = Segment(B_3, B_7)
b_5 = Segment(B_4, B_8)
b_6 = Segment(B_1, B_5)
b_7 = Segment(B_2, B_6)
b_8 = Segment(C_7, C_8)
b_9 = Segment(D_5, D_8)
b_{10} = Segment(C_5, C_6)
b_{11} = Segment(D_7, D_6)
c_0 = Segment(B_7, C_7)
c_1 = Segment(B_7, D_7)
c_2 = Segment(B_8, C_8)
c_3 = Segment(B_8, D_8)
c_4 = Segment(B_5, D_5)
c_5 = Segment(B_5, C_5)
c_6 = Segment(B_6, C_6)
c_7 = Segment(B_6, D_6)
c_8 = Segment(C_6, D_6)
c_9 = Segment(C_5, D_5)
c_{10} = Segment(C_7, D_7)
c_{11} = Segment(C_8, D_8)
c_{12} = Segment(B_2, D_2)
c_{13} = Segment(B_2, C_2)
c_{14} = Segment(D_2, C_2)
c_{15} = Segment(D_1, C_1)
c_{16} = Segment(B_1, C_1)
c_{17} = Segment(B_1, D_1)
c_{18} = Segment(B_3, D_3)
c_{19} = Segment(C_3, D_3)
c_{20} = Segment(C_3, B_3)
c_{21} = Segment(C_4, B_4)
c_{22} = Segment(D_4, B_4)
c_{23} = Segment(D_4, C_4)

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

Tool: Poly_R8
Input: A, B, C, D, E, F, G, H
Output: poly1'

α = Angle(F, D, A)
i: sqrt(sgn(sin(α)))
A' = Dilate(A, i, A)
B' = Dilate(B, i, A)
C' = Dilate(C, i, A)
D' = Dilate(D, i, A)
E' = Dilate(E, i, A)
F' = Dilate(F, i, A)
G' = Dilate(G, i, A)
H' = Dilate(H, i, A)
poly1', a', b', c', d', e', f', g', h' = Polygon(A', B', C', D', E', F', G', H')