I suppose point A is the intersection point of both rays...then, after choosing point B on ray 1 and drawing from it a perpendicular to ray 2 you get a straight-angle triangle 30-60-90, sometimes aka golden triangle, with hipotenuse d, and thus the leg opposite to the 90 deg. angle is half the hipotenuse ==> the first part of the polygonal line is

, and the other leg's length is, by Pythagoras,

. Repeat the process, again you get a 30-60-90 triangle but with hipotenuse

, so this time the polygonal line's length is

, and etc.

The whole polygonal line's length is thus

Tonio