長方體的展開
Author: 藍邦偉  老師

x

y

z

顯示xy平面

顯示單位向量

顯示座標軸

長

寬

高

Reset

Step 1

Step2

A: (x((Corner[3] + 39 * Corner[4]) / 40), y((Corner[1] + 9 * Corner[4]) / 10))
B: (x((4 * Corner[3] + 16 * Corner[4]) / 20), y((Corner[1] + 9 * Corner[4]) / 10))
a_1 = Segment(A, B)
C: (3 * A + B) / 4
D: (3 * B + A) / 4
E = Point(a_1)
c = Circle(C, E)
c' = Translate(c, Vector[C, D])
A' = Rotate(A, 270*°, C)
B' = Rotate(B, 270*°, C)
a' = Segment(A', B')
c'' = Rotate(c', 270*°, C)
D' = Rotate(D, 270*°, C)
E' = Rotate(Translate[E, Vector[C, D]], 90*°, D)
E'' = Rotate(E', 270*°, C)
F = Point(c'')
G = Point(c')
α = Angle(E'', D', F)
b = Segment(D', F)
d = Segment(D, G)
β = Angle(G, D, E')
I: C + (b * cos(α), b * sin(α) * sin(β))
J: C + (b * cos(α + 90°), b * sin(α + 90°) * sin(β))
K: C + (0, b * cos(β))
e = Segment(C, K)
f = Segment(C, I)
g = Segment(C, J)
O = (0.30678910752044947, -3.7248978109716915)
I' = Translate(I, Vector[C, O])
J' = Translate(J, Vector[C, O])
K' = Translate(K, Vector[C, O])
L = 8 (slider from 1 to 10, step 1)
I'' = Dilate(I', L, O)
J'' = Dilate(J', L, O)
K'' = Dilate(K', L, O)
I''' = Dilate(I'', -1, O)
J''' = Dilate(J'', -1, O)
K''' = Dilate(K'', -1, O)
u' = Vector(I''', I'')
v' = Vector(J''', J'')
w' = Vector(K''', K'')
h_2 = Segment(D', E'')
i = Segment(D, E')
軌跡1 = Locus(I, F)
L_{axis}: L
j = false
w = Vector(O, K')
u = Vector(O, I')
v = Vector(O, J')
k = false
l_2 = false
list1 = Sequence(CurveCartesian[x(O + t * u + s * v), y(O + t * u + s * v), t, -L, L], s, -L, L, 1)
list2 = Sequence(CurveCartesian[x(O + t * u + s * v), y(O + t * u + s * v), s, -L, L], t, -L, L, 1)
C_a: C + (b * cos(α + 10°), b * sin(α + 10°) * sin(β))
C_b: C + (b * cos(α + 20°), b * sin(α + 20°) * sin(β))
C_c: C + (b * cos(α + 30°), b * sin(α + 30°) * sin(β))
C_d: C + (b * cos(α + 40°), b * sin(α + 40°) * sin(β))
C_e: C + (b * cos(α + 50°), b * sin(α + 50°) * sin(β))
p = Conic(C_a, C_b, C_c, C_d, C_e)
l_1 = 3 (slider from 1 to 6, step 0.1)
w_1 = 4 (slider from 1 to 6, step 0.1)
h_1 = 5 (slider from 1 to 6, step 0.1)
E_a: O + l_1 * u + w_1 * v
E_b: O - l_1 * u + w_1 * v
E_c: O - l_1 * u - w_1 * v
E_d: O + l_1 * u - w_1 * v
γ = 0 rad (slider from 0*° to 1.5707963267948966, step 0.1*°)
多邊形1, e_a, e_b, e_c, e_d = Polygon(E_a, E_b, E_c, E_d)
E_f: E_a + 2 * h_1 * cos(γ) * w + h_1 * u * sin(γ)
E_i: E_d + 2 * h_1 * cos(γ) * w + h_1 * u * sin(γ)
E_g: E_b + 2 * h_1 * cos(γ) * w - h_1 * u * sin(γ)
E_h: E_c + 2 * h_1 * cos(γ) * w - h_1 * u * sin(γ)
多邊形2, e_1, e_f, e_i, e_2 = Polygon(E_a, E_f, E_i, E_d)
多邊形3, e_3, e_4, e_g, e_h = Polygon(E_c, E_b, E_g, E_h)
E_{f_2}: E_a + 2 * h_1 * cos(γ) * w + h_1 * v * sin(γ)
E_{g_2}: E_b + 2 * h_1 * cos(γ) * w + h_1 * v * sin(γ)
多邊形4, e_5, e_{f_2}, e_{g_2}, e_6 = Polygon(E_a, E_{f_2}, E_{g_2}, E_b)
E_{i_2}: E_d + 2 * h_1 * cos(γ) * w - h_1 * v * sin(γ)
E_{h_2}: E_c + 2 * h_1 * cos(γ) * w - h_1 * v * sin(γ)
多邊形5, e_7, e_{h_2}, e_{i_2}, e_8 = Polygon(E_c, E_{h_2}, E_{i_2}, E_d)
δ = 0 rad (slider from 0 to 3.141592653589793, step 0.1*°)
E_{i_1}: E_h + 2 * l_1 * cos(δ) * u + 2 * h_1 * sin(δ) * w
E_{f_1}: E_g + 2 * l_1 * cos(δ) * u + 2 * h_1 * sin(δ) * w
多邊形6, e_{f_1}, e_9, e_{10}, e_{i_1} = Polygon(E_{f_1}, E_g, E_h, E_{i_1})
多邊形12 = Poly_C4(E_a, E_b, E_c, E_d)
多邊形10 = Poly_B4(E_{i_2}, E_d, E_c, E_{h_2})
多邊形9 = Poly_G4(E_f, E_a, E_d, E_i)
多邊形7 = Poly_R4(E_{g_2}, E_b, E_a, E_{f_2})
多邊形8 = Poly_Y4(E_h, E_c, E_b, E_g)
inputBox1 = Textfield(l_1)
inputBox2 = Textfield(w_1)
inputBox3 = Textfield(h_1)
poly1 = Poly_B4(E_{i_1}, E_h, E_g, E_{f_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_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_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')