角柱
Author: 藍邦偉 老師

拉動n決定正多邊形的邊數，r決定正多邊形的外接圓半徑，h決定高度

x

y

z

單位向量

座標軸

Reset

Start

α = 0.3490658503988659 rad (slider from 0 to 6.283185307179586, step 0.1*°)
β = 1.3788101090755203 rad (slider from 0 to 6.283185307179586, step 0.017453292519943295)
O = (8.957686644524927, 1.4380557701689294)
X_{unit}: O + (cos(α), sin(α) * cos(β))
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
Z_{unit}: O + (0, sin(β))
u = Vector(O, X_{unit})
v = Vector(O, Y_{unit})
w = Vector(O, Z_{unit})
L = 7 (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)
A_1: O + L * u
B_1: O + L * v
Z: O + L * w
c = false
d = false
n = 6 (slider from 3 to 20, step 1)
r = 3 (slider from 1 to 7, step 0.1)
e = CurveCartesian(x(O + r * cos(t) * u + r * sin(t) * v), y(O + r * cos(t) * u + r * sin(t) * v), t, 0, 6.283185307179586)
h = 6 (slider from 1 to 8, step 0.1)
List1 = Sequence(O + r * cos(2 * i * 3.141592653589793 / n) * u + r * sin(2 * i * 3.141592653589793 / n) * v, i, 0, n - 1)
H: O + h * w
f = Segment(Element[List1, 1], Element[List1, 2])
List3 = Sequence(Segment[Element[List1, i], Element[List1, i + 1]], i, 1, n)
g = Segment(Element[List1, 1], Element[List1, n])
List4 = Sequence(O + r * cos(2 * i * 3.141592653589793 / n) * u + r * sin(2 * i * 3.141592653589793 / n) * v + h * w, i, 0, n - 1)
List5 = Sequence(Segment[Element[List4, i], Element[List4, i + 1]], i, 1, n)
List6 = Sequence(Segment[Element[List4, i], Element[List1, i]], i, 1, n)
i = Segment(Element[List4, 1], Element[List4, n])
text1: "$ 正" + (LaTeX[n]) + "角柱 $"