Author: 藍邦偉　老師

單位向量

座標軸

Start

x

y

z

$ O $

$我是太陽$

$我是平行光$

Egypt

$已知一根木棍長度為2公尺，\;將其直立於地面上，\;影子長為5公尺，$
$若金字塔的影長為100公尺，\;試求金字塔高度.$

O = (9.321910989543614, 1.9832054238355292)
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
α = 4.276056667386107 rad (slider from 0 to 6.283185307179586, step 0.1*°)
X_{unit}: O + (cos(α), sin(α) * cos(β))
u = Vector(O, X_{unit})
Y_{unit}: O + (-1 * sin(α), cos(α) * cos(β))
v = Vector(O, Y_{unit})
Poly3, h, i, q_1, c_2 = Polygon(O + 8 * u + 8 * v, O - 8 * u + 8 * v, O - 8 * u - 8 * v, O + 8 * u - 8 * v)
Lo = -300 (slider from -300 to 300, step 0.1)
La = 108 (slider from -300 to 300, step 0.1)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
L = 7 (slider from 1 to 10, step 1)
yy = Vector(O - L * v, O + L * v)
zz = Vector(O - L * w, O + L * w)
xx = Vector(O - L * u, O + L * u)
c = false
d = false
Q_2: 0.3 * Corner[2] + 0.7 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
g = Segment(Q_2, Q_3)
A_1: O + 2 * u + 2 * v
A_2: O - 2 * u + 2 * v
A_3: O - 2 * u - 2 * v
A_4: O + 2 * u - 2 * v
A_5: O + 2 * sqrt(3) * w
n = Segment(A_5, O)
Poly2, p, q, r, s = Polygon(O + 12 * u + 12 * v, O - 12 * u + 12 * v, O - 12 * u - 12 * v, O + 12 * u - 12 * v)
A: Lo * u + La * v + 100 * w
t: x = x(A)
a_1: y = y(O)
b_1 = Line(A_5, A)
B = Intersect(a_1, b_1)
C = Intersect(t, a_1)
c_1 = Segment(A, A_5)
d_1 = Segment(A_5, B)
D = PointIn(Poly3)
e_1 = Segment(O, B)
f_1 = Segment(D, D + (0, 1))
qu: f_1 / n
g_1 = Line(D, e_1)
D_1: D + qu * Vector[O, B]
D_0: D + (0, 1)
h_1 = Segment(D_1, D_0)
j_1 = OrthogonalLine(A, c_1)
k_1 = OrthogonalLine(D_0, j_1)
E = Intersect(j_1, k_1)
l_1 = Segment(D_0, E)
γ = Angle(D_0, D, D_1)
δ = Angle(A_5, O, B)
a, b = SDLine(A_5, A_1, A_4, A_2)
e, f = SDLine(A_5, A_2, A_1, A_3)
j, k = SDLine(A_5, A_3, A_2, A_4)
l, m = SDLine(A_5, A_4, A_3, A_1)
poly2 = Poly_C3(A_5, A_3, A_4)
poly4 = Poly_C3(A_1, A_2, A_5)
poly5 = Poly_C3(A_5, A_2, A_3)
i_1, m_1 = SDLine(A_1, A_2, A_4, A_5)
n_1, p_1 = SDLine(A_2, A_3, A_1, A_5)
r_1, s_1 = SDLine(A_3, A_4, A_2, A_5)
t_1, a_2 = SDLine(A_4, A_1, A_3, A_5)
b_2 = Segment(D, D_1)
Sun = Circle(A, 2000)
poly1 = Poly_B3(A_5, A_4, A_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_C3
Input: A, B, C
Output: poly1

poly1 = Poly_B3(A, B, C)

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 (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')