Also solve for v=1.0 cm/s, L=30 cm and N = 3 (an equilateral triangle).
Let’s consider the general case.
Please look on the picture below.
The formula of the angle α for the regular polygon is α = 2π/N.
The velocity of the bug at the left is v and the component of the velocity of the bug at the right towards the same direction is v * cos(α) .
Then the relative velocity will be v – v * cos(α) .
Now, we should use the following formula t = L/V , where L – the length, t – time and V – the relative velocity.
The final formula will be
t = L / ( v – v *cos (2π/N) )
t = 30 / ( 1 – 1 *cos (2π/3) ) = 20 s
GIF Animation Credit: math.stackexchange.com