蜜蜂與螞蟻
Author: 藍邦偉　老師

單位向量

座標軸

Start

x

y

z

$ O $

$寬=%v$

$高=%v$

$長=%v$

$ 蜜蜂與螞蟻 $

方向1

方向2

方向3

Bee

Ant

$ 蜜蜂 $

$ 螞蟻 $

O = (12.000904766339916, 3.583144477851782)
β = 1.3962634015954636 rad (slider from 0 to 6.283185307179586, step 0.1*°)
Z_{unit}: O + (0, sin(β))
w = Vector(O, Z_{unit})
α = 4.101523742186674 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})
L = 4 (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)
d_b = false
d_a = false
Q_2: 0.25 * Corner[2] + 0.75 * Corner[1]
Q_3: (x(Q_2), y(Corner[3]))
g = Segment(Q_2, Q_3)
poly1, h_1, q_1, q_4, i = Polygon(Corner[1], Q_2, Q_3, Corner[4])
c = 3 (slider from 0 to 5, step 0.1)
h = 1 (slider from 1 to 5, step 0.1)
l = 5 (slider from 1 to 5, step 0.1)
d = 0 rad (slider from 0*° to 90*°, step 0.1*°)
s = 0 rad (slider from 0*° to 90*°, step 0.1*°)
γ = 0 rad (slider from 0*° to 90*°, step 0.1*°)
A_2: O + l * u + c * v
A_3: O + c * v
a = false
b = false
e = false
A_1: O + l * u
A_4: O + h * w
A_6: O + h * w + c * v
A_5: O + l * u + h * w
Poly_{xy}, o, a_1, a_2, a_3 = Polygon(O, A_1, A_2, A_3)
Poly_{yz}, o_1, a_4, a_6, a_5 = Polygon(O, A_3, A_6, A_4)
Poly_{zx}, o_2, a_7, a_8, a_9 = Polygon(O, A_1, A_5, A_4)
B_4: O + h * cos(d) * w - h * sin(d) * v
B_5: O + l * u + h * cos(d) * w - h * sin(d) * v
poly_1, o_3, a_{10}, b_5, b_4 = Polygon(O, A_1, B_5, B_4)
B_0: O + h * cos(s) * w - h * sin(s) * u
B_1: O + h * cos(s) * w - h * sin(s) * u + c * v
poly_2, o_4, a_{11}, b_1, b_0 = Polygon(O, A_3, B_1, B_0)
C_1 = Point(Segment[O, A_1])
c_2 = Segment(C_1, A_2)
c_0 = Segment(A_2, B_4)
D_1 = Point(Segment[O, A_3])
d_1 = Segment(A_2, D_1)
d_0 = Segment(A_2, B_0)
d_2 = Segment(B_0, D_1)
c_1 = Segment(B_4, C_1)
B_2: A_1 - l * cos(γ) * u - l * sin(γ) * v
B_3: A_1 - l * cos(γ) * u - l * sin(γ) * v + h * w
poly_3, n, p, q, r = Polygon(B_2, B_3, A_5, A_1)
A_7: A_2 + h * w
e_0 = Segment(O, A_1)
e_2 = Segment(O, A_3)
e_3 = Segment(O, A_4)
e_4 = Segment(A_2, A_3)
e_5 = Segment(A_2, A_1)
e_6 = Segment(A_2, A_7)
e_7 = Segment(A_5, A_7)
e_8 = Segment(A_6, A_7)
e_9 = Segment(A_6, A_3)
e_a = Segment(A_6, A_4)
e_b = Segment(A_5, A_4)
e_c = Segment(A_5, A_1)
poly_0, f, j, k, m = Polygon(A_2, A_7, A_5, A_1)
C_3 = Point(Segment[A_5, A_1])
f_1 = Segment(A_2, C_3)
f_2 = Segment(B_3, C_3)
f_0 = Segment(B_3, A_2)
t = 0 (slider from 0 to 1, step 0.01)
z = false
e_1 = false
A: A_2 + t * Vector[A_2, A_4]
g_1 = Segment(A, A_2)