Ant cube
Author: Daniel Mentrard

 \sqrt{ 5 } 

See the way flat

1

Open

Close

An ant moves on the faces of a cube 1 dm
 edge along the path AIG.
 What is the length of this way?

θ = 1.5707963267948966 (slider from 0 to 1.5707963267948966, step 0.02)
O = (5.808217011752192, -0.4537654059278926)
Zoom = 1 (slider from 1 to 5, step 0.1)
OO = (9.164643193898836, 1.1232612202259666)
View = (7.181266955433821, 0.5123181344031745)
sintheta: sin(y(View))
sinphi: sin(x(View))
cosphi: cos(x(View))
X: (x(O) + Zoom * sinphi, y(O) - Zoom * cosphi * sintheta)
u = Vector(O, X)
Y: (x(O) + Zoom * cosphi, y(O) + Zoom * sinphi * sintheta)
v = Vector(O, Y)
costheta: cos(y(View))
Z: (x(O), y(O) + Zoom * costheta)
w = Vector(O, Z)
E: u * (-1.0) + v * (-1.0) + w * (-1.0) + OO
C: u + v + w + OO
A: u * (-1.0) + v * (-1.0) + w + OO
B: u + v * (-1.0) + w + OO
D: u * (-1.0) + v + w + OO
I_2: u + v * (-1.0) + w * (-1.0) + OO
G: u + v + w * (-1.0) + OO
H: u * (-1.0) + v + w * (-1.0) + OO
poly2, e, f, g, h = Polygon(E, I_2, G, H)
F': v * 2.0 * cos(3.141592653589793 - θ) + w * 2.0 * sin(3.141592653589793 - θ) + I_2
E': v * 2.0 * cos(3.141592653589793 - θ) + w * 2.0 * sin(3.141592653589793 - θ) + E
poly6, e', e_2, f_3, f' = Polygon(E', E, I_2, F')
F'': u * 2.0 * cos(θ) + w * 2.0 * sin(θ) + I_2
G': u * 2.0 * cos(θ) + w * 2.0 * sin(θ) + G
poly7, f_4, f'', g', g_3 = Polygon(I_2, F'', G', G)
G'': v * 2.0 * cos(θ) + w * 2.0 * sin(θ) + G
H': v * 2.0 * cos(θ) + w * 2.0 * sin(θ) + H
poly8, h_2, g_4, g'', h' = Polygon(H, G, G'', H')
H'': u * 2.0 * cos(3.141592653589793 - θ) + w * 2.0 * sin(3.141592653589793 - θ) + H
E'': u * 2.0 * cos(3.141592653589793 - θ) + w * 2.0 * sin(3.141592653589793 - θ) + E
poly9, e_3, h_3, h'', e'' = Polygon(E, H, H'', E'')
a = Segment(A, B)
b = Segment(B, C)
c = Segment(C, D)
d = Segment(D, A)
j = Segment(A, E)
k = Segment(B, I_2)
l = Segment(C, G)
m = Segment(D, H)
F''': u * 2.0 * cos(2.0 * θ) + w * 2.0 * sin(2.0 * θ) + F''
G''': u * 2.0 * cos(2.0 * θ) + w * 2.0 * sin(2.0 * θ) + G'
poly1, f''_1, f''', g''', g'_1 = Polygon(F'', F''', G''', G')
I_1 = Midpoint(F'', G')
i = Segment(F''', I_1)
n = Segment(I_1, G)
I = Midpoint(B, C)
p = Segment(A, I)
q = Segment(I, G)
r = false
s = Segment(B, I)
t = Segment(I, C)
K = Midpoint(f_4)
a_1 = Segment(A, I)
b_1 = Segment(I, G)
z = 1.22 (slider from 0 to 5.2, step 0.01)
c_1 = Circle(A, If[z < a_1, z, a_1])
F, L = Intersect(c_1, a_1)
d_1 = Segment(A, F)
e_1 = Circle(I, If[z - 2.6 < b_1, z - 2.6, b_1])
J, P = Intersect(e_1, b_1)
f_1 = Segment(I, J)
g_1 = Circle(A, If[z < a_1, z - 0.4, a_1 - 0.4])
M = Intersect(g_1, d_1)
h_1 = Circle(I, If[z - 2.6 < b_1, z - 2.6 - 0.4, b_1 - 0.4])
N, Q = Intersect(h_1, f_1)
Vitesse = 1 (slider from -5 to 5, step 0.1)