正四角錐的展開
Author: 藍邦偉  老師

x

y

z

單位向量

正四角錐的展開

Reset

Start

α = 4.4505895925855405 rad (slider from 0 to 6.283185307179586, step 0.017)
β = 1.3788101090755203 rad (slider from 0 to 6.283185307179586, step 0.017)
O = (8.935691828548391, 4.165412951259465)
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 = 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)
A_1: O + L * u
B_1: O + L * v
Z: O + L * w
c = false
t = 1 (slider from 0 to 1, step 0.01)
r: L - 2
A_a: O + r * u
A_b: O + r * v
A_c: O - r * u
A_d: O - r * v
A_e: O + r * w
e = Segment(A_d, A_a)
f = Segment(A_a, A_b)
g = Segment(A_b, A_c)
h = Segment(A_c, A_d)
i = Segment(A_e, A_a)
j = Segment(A_e, A_d)
k = Segment(A_e, A_c)
l = Segment(A_e, A_b)
A = Midpoint(A_d, A_a)
C = Midpoint(A_a, A_b)
d = 1.3660254037844386
B_a: O + d * r * u + d * r * v
B_b: O + d * r * u - d * r * v
B_c: O - d * r * u - d * r * v
B_d: O - d * r * u + d * r * v
m = Segment(A_e, B_b)
n = Segment(A_e, B_d)
p = Segment(A_e, B_a)
q = Segment(A_e, B_c)
V_1: O + r * d * (1 - t) * u + r * d * (1 - t) * v + r * t * w
s = Segment(A_a, V_1)
a_1 = Segment(A_b, V_1)
V_2: O - r * d * (1 - t) * u + r * d * (1 - t) * v + r * t * w
V_3: O - r * d * (1 - t) * u - r * d * (1 - t) * v + r * t * w
V_4: O + r * d * (1 - t) * u - r * d * (1 - t) * v + r * t * w
b_1 = Segment(V_4, A_a)
c_1 = Segment(V_4, A_d)
d_1 = Segment(V_3, A_d)
e_1 = Segment(V_3, A_c)
f_1 = Segment(V_2, A_b)
g_1 = Segment(V_2, A_c)
多邊形1 = Poly_C3(V_1, A_a, A_b)
多邊形2 = Poly_C3(V_2, A_b, A_c)
多邊形3 = Poly_C3(V_3, A_c, A_d)
多邊形4 = Poly_C3(V_4, A_d, A_a)

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

poly1 = Poly_B3(A, B, C)