正四面體與正四角錐
Author: 藍邦偉　老師

單位向量

座標軸

x

y

z

正八面體

$ 正四面體與正四角錐 $

α = 5.1487212933832724 rad (slider from 0 to 6.283185307179586, step 0.017)
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.017)
O = (11.121655982633577, 2.5709749371342037)
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)
c = false
d = false
Q_2: 0.25 * Corner[2] + 0.75 * 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)
t1 = 0 (slider from 0 to 1, step 0.01)
A_1: O + 3 * u - 3 * v + 3 * t1 * v
A_3: O - 3 * u - 9 * v + 3 * t1 * v
A_2: O - 3 * u - 3 * v + 3 * t1 * v
A_4: O + 3 * u - 9 * v + 3 * t1 * v
A_5: O - 6 * v + 3 * sqrt(2) * w + 3 * t1 * v
B_1: O + 3 * u + 3 * v - 3 * t1 * v
B_2: O - 3 * u + 3 * v - 3 * t1 * v
B_3: O + (3 + 3 * sqrt(3)) * v - 3 * t1 * v
B_4: O + (3 + sqrt(3)) * v + 2 * sqrt(6) * w - 3 * t1 * v
a1 = Segment(A_1, A_2)
a2 = Segment(A_3, A_2)
a3 = Segment(A_3, A_4)
a4 = Segment(A_1, A_4)
a5 = Segment(A_1, A_5)
a6 = Segment(A_5, A_2)
a7 = Segment(A_3, A_5)
a8 = Segment(A_5, A_4)
b1 = Segment(B_1, B_2)
b2 = Segment(B_3, B_2)
b3 = Segment(B_3, B_1)
b4 = Segment(B_4, B_1)
b5 = Segment(B_4, B_2)
b6 = Segment(B_4, B_3)
C_1: O + 3 * u
C_2: O - 3 * u
E_3: O + 3 * sqrt(3) * v
D_1: O - 3 * v + 3 * sqrt(2) * w
γ = 1.2308061885064012 rad (slider from 70.52*° to 2.186276035465284, step 0.01*°)
C_4: O + 3 * sqrt(3) * (cos(γ) * v + sin(γ) * w)
h = Vector(B_4, E_3)
O' = Translate(O, h)
G: O - v + sqrt(2) * w
c_1 = Segment(C_4, C_2)
c_2 = Segment(C_4, C_1)
r = -4.6 (slider from -5 to 5, step 0.1)
C_3: O + 5.3 * (cos(γ - 70.52°) * v + sin(γ - 70.52°) * w)
E_5: O + 3 * v + 3 * sqrt(2) * w
c_3 = Segment(C_2, C_3)
c_4 = Segment(C_3, C_1)
c_5 = Segment(C_4, C_3)
i = false
A_6: O - 6 * v - 3 * sqrt(2) * w + 3 * t1 * v
d_1 = Segment(A_6, A_1)
d_2 = Segment(A_6, A_2)
d_3 = Segment(A_6, A_3)
d_4 = Segment(A_6, A_4)
poly1 = Poly_B3(A_5, A_4, A_1)
poly2 = Poly_B3(B_4, B_1, B_3)
poly3 = Poly_P3(A_5, A_3, A_4)
poly4 = Poly_Y3(B_4, B_3, B_2)
poly5 = Poly_Y3(A_5, A_2, A_3)
poly6 = Poly_G3(A_5, A_1, A_2)
poly7 = Poly_G3(B_4, B_2, B_1)
poly8 = Poly_Y3(C_4, C_3, A_2)
poly9 = Poly_B3(C_4, A_1, C_3)
poly10 = Poly_G3(C_4, A_2, A_1)
poly11 = Poly_R3(C_3, A_1, A_2)
poly12 = Poly_R3(B_3, B_1, B_2)
poly13 = Poly_R4(A_1, A_4, A_3, A_2)
poly14 = Poly_Y3(A_4, A_6, A_1)
poly15 = Poly_Y3(A_1, A_6, A_2)
poly16 = Poly_R3(A_3, A_6, A_4)
poly17 = Poly_G3(A_2, A_6, A_3)

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_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_B3 (command Poly_B31)
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_Y3
Input: A, B, C
Output: poly1

poly1 = Poly_B3(A, B, C)

Tool: Poly_B3 (command Poly_B32)
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_P3
Input: A, B, C
Output: poly1

poly1 = Poly_B3(A, B, C)

Tool: Poly_G3
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_B3 (command Poly_B33)
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)

Tool: Poly_R3
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_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')