3D 座標架的製作
Author: 藍邦偉  老師

正十二角柱的製作

單位向量

單位點

座標軸

xy平面

x

y

z

α = 2.792526803190927 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
β = 4.1887902047863905 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
L = 5 (slider from 1 to 10, step 1)
O = (0, 0)
X_{unit}: O + (cos(α), sin(α) * cos(β))
Y_{unit}: O + (-sin(α), cos(α) * cos(β))
Z_{unit}: O + (0, -sin(β))
u = Vector(O, X_{unit})
v = Vector(O, Y_{unit})
w = Vector(O, Z_{unit})
x_{Axis} = Vector(O - L * u, O + L * u)
y_{Axis} = Vector(O - L * v, O + L * v)
z_{Axis} = Vector(O - L * w, O + L * w)
多邊形1, d, e, f, g = Polygon(O + L * u + L * v, O - L * u + L * v, O - L * u - L * v, O + L * u - L * v)
A = (20.64, 16.56)
h_1 = false
i = false
j = false
k = false
h = 6.4 (slider from 1 to 10, step 0.1)
r = 3.8 (slider from 1 to 10, step 0.1)
A_1: O + r * cos(30°) * u + r * sin(30°) * v
A_2: O + r * cos(60°) * u + r * sin(60°) * v
A_3: O + r * cos(90°) * u + r * sin(90°) * v
A_4: O + r * cos(120°) * u + r * sin(120°) * v
A_5: O + r * cos(150°) * u + r * sin(150°) * v
A_6: O + r * cos(180°) * u + r * sin(180°) * v
A_7: O + r * cos(210°) * u + r * sin(210°) * v
A_8: O + r * cos(240°) * u + r * sin(240°) * v
A_9: O + r * cos(270°) * u + r * sin(270°) * v
A_10: O + r * cos(300°) * u + r * sin(300°) * v
A_11: O + r * cos(330°) * u + r * sin(330°) * v
A_12: O + r * cos(360°) * u + r * sin(360°) * v
B_1: A_1 + h * w
B_2: A_2 + h * w
B_3: A_3 + h * w
B_4: A_4 + h * w
B_5: A_5 + h * w
B_6: A_6 + h * w
B_7: A_7 + h * w
B_8: A_8 + h * w
B_9: A_9 + h * w
B_10: A_10 + h * w
B_11: A_11 + h * w
B_12: A_12 + h * w
a_0 = Segment(A_1, A_2)
a_1 = Segment(A_2, A_3)
a_2 = Segment(A_3, A_4)
a_3 = Segment(A_4, A_5)
a_4 = Segment(A_5, A_6)
a_5 = Segment(A_6, A_7)
a_6 = Segment(A_7, A_8)
a_7 = Segment(A_8, A_9)
a_8 = Segment(A_9, A_10)
a_9 = Segment(A_10, A_11)
a_10 = Segment(A_11, A_12)
a_11 = Segment(A_12, A_1)
b_0 = Segment(B_1, B_2)
b_1 = Segment(B_2, B_3)
b_2 = Segment(B_3, B_4)
b_3 = Segment(B_4, B_5)
b_4 = Segment(B_5, B_6)
b_5 = Segment(B_6, B_7)
b_6 = Segment(B_7, B_8)
b_7 = Segment(B_8, B_9)
b_8 = Segment(B_9, B_10)
b_9 = Segment(B_10, B_11)
b_10 = Segment(B_11, B_12)
b_11 = Segment(B_12, B_1)
c_1 = Segment(A_1, B_1)
c_2 = Segment(A_2, B_2)
c_3 = Segment(A_3, B_3)
c_4 = Segment(A_4, B_4)
c_5 = Segment(A_5, B_5)
c_6 = Segment(A_6, B_6)
c_7 = Segment(A_7, B_7)
c_8 = Segment(A_8, B_8)
c_9 = Segment(A_9, B_9)
c_10 = Segment(A_10, B_10)
c_11 = Segment(A_11, B_11)
c_12 = Segment(A_12, B_12)
poly1, b_{10}, b_{11}, a_{10}, a_{11} = Polygon(B_8, B_7, A_7, A_8)
poly2, b_{12}, b_{13}, a_{12}, a_{13} = Polygon(B_9, B_8, A_8, A_9)
poly3, b_{14}, b_{15}, a_{14}, a_{15} = Polygon(B_10, B_9, A_9, A_10)
poly4, b_{16}, b_{17}, a_{16}, a_{17} = Polygon(B_11, B_10, A_10, A_11)
poly5, b_{18}, b_12, b_{19}, b_{20}, b_{21}, b_{22}, b_{23}, b_{24}, b_{25}, b_{26}, b_{27}, b_{28} = Polygon(B_1, B_12, B_11, B_10, B_9, B_8, B_7, B_6, B_5, B_4, B_3, B_2)
poly6, b_{29}, b_{30}, a_{18}, a_{19} = Polygon(B_7, B_6, A_6, A_7)
poly7, b_{31}, b_{32}, a_{20}, a_{21} = Polygon(B_6, B_5, A_5, A_6)
poly8, b_{33}, b_{34}, a_{22}, a_{23} = Polygon(B_5, B_4, A_4, A_5)
poly9, b_{35}, a_{24}, a_{25}, b_{36} = Polygon(B_4, A_4, A_3, B_3)
poly10, a_{26}, a_{27}, b_{37}, b_{38} = Polygon(A_3, A_2, B_2, B_3)
poly11, b_{39}, b_{40}, a_{28}, a_12 = Polygon(B_12, B_11, A_11, A_12)
poly12, b_{41}, b_{42}, a_{29}, a_{30} = Polygon(B_1, B_12, A_12, A_1)
poly13, b_{43}, b_{44}, a_{31}, a_{32} = Polygon(B_2, B_1, A_1, A_2)
B = (2.495071794921131, 1.9840455007747353)
poly14, a_{33}, a_{34}, a_{35}, a_{36}, a_{37}, a_{38}, a_{39}, a_{40}, a_{41}, a_{42}, a_{43}, a_{44} = Polygon(A_8, A_9, A_10, A_11, A_12, A_1, A_2, A_3, A_4, A_5, A_6, A_7)