正五角錐台
Author: 藍邦偉  老師

x

y

z

單位向量

顯示座標軸

五角錐台

Reset

Start

x

y

z

α = 5.1487212933832724 rad (slider from 0 to 6.283185307179586, step 0.017)
β = 1.3089969389957472 rad (slider from 0 to 6.283185307179586, step 0.017)
O = (9.02367109245455, 2.1638846973946357)
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 = 6 (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
Q_2: 0.2 * Corner[2] + 0.8 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
多邊形1, e, q_2, q_3, f = Polygon(Corner[1], Q_2, Q_3, Corner[4])
g = Segment(Q_2, Q_3)
R = 5.8 (slider from 4 to 7, step 0.1)
r = 2.4 (slider from 0 to 4, step 0.1)
θ = 0 rad (slider from 0 to 360*°, step 0.1*°)
P_0: O + R * cos(θ) * u + R * sin(θ) * v
P_1: O + R * cos(θ + 72°) * u + R * sin(θ + 72°) * v
P_2: O + R * cos(θ + 144°) * u + R * sin(θ + 144°) * v
P_3: O + R * cos(θ + 216°) * u + R * sin(θ + 216°) * v
P_4: O + R * cos(θ + 288°) * u + R * sin(θ + 288°) * v
h = 4.4 (slider from 1 to 8, step 0.1)
R_0: O + r * cos(θ) * u + r * sin(θ) * v + h * w
R_1: O + r * cos(θ + 72°) * u + r * sin(θ + 72°) * v + h * w
R_2: O + r * cos(θ + 144°) * u + r * sin(θ + 144°) * v + h * w
R_3: O + r * cos(θ + 216°) * u + r * sin(θ + 216°) * v + h * w
R_4: O + r * cos(θ + 288°) * u + r * sin(θ + 288°) * v + h * w
i, j = SDLine(R_0, P_0, P_4, P_1)
k, l = SDLine(R_1, P_1, P_0, P_2)
m, n = SDLine(R_2, P_2, P_1, P_3)
p, q = SDLine(R_3, P_3, P_2, P_4)
s, t = SDLine(R_4, P_4, P_3, P_0)
a_1, b_1 = SDLine(R_3, R_4, P_3, R_1)
c_1, d_1 = SDLine(R_2, R_3, P_2, R_0)
e_1, f_1 = SDLine(R_1, R_2, P_1, R_4)
g_1, h_1 = SDLine(R_0, R_1, P_0, R_3)
i_1, j_1 = SDLine(R_4, R_0, P_4, R_2)
k_1, l_1 = SDLine(P_4, P_0, P_2, R_4)
m_1, n_1 = SDLine(P_0, P_1, P_3, R_0)
p_1, q_1 = SDLine(P_1, P_2, P_4, R_1)
r_1, s_1 = SDLine(P_2, P_3, P_0, R_2)
t_1, a_2 = SDLine(P_3, P_4, P_1, R_3)
poly1 = Poly_C4(R_3, P_3, P_4, R_4)
poly2 = Poly_P4(R_4, P_4, P_0, R_0)
poly3 = Poly_Y4(R_0, P_0, P_1, R_1)
poly4 = Poly_G4(R_1, P_1, P_2, R_2)
poly5 = Poly_B4(R_2, P_2, P_3, R_3)
poly6 = Poly_R5(R_2, R_3, R_4, R_0, R_1)
poly7 = Poly_R5(P_4, P_3, P_2, P_1, P_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_B4
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_R4
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_C4
Input: A, B, C, D
Output: poly1

poly1 = Poly_R4(A, B, C, D)

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_P4
Input: A, B, C, D
Output: poly1

poly1 = Poly_R4(A, B, C, D)

Tool: Poly_Y4
Input: A, B, C, D
Output: poly1

poly1 = Poly_R4(A, B, C, D)

Tool: Poly_R5
Input: A, B, C, D, E
Output: poly1'

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