Problem I. 147. (December 2006)
I. 147. The following algorithm generates some spirallike figures. Consider a horizontal line segment, then, in every step, the starting point of the next, nth line segment and the endpoint of the previous one is joined in such a way that these segments encompass an angle of b_{n}, where numbers b_{n} are members of an arithmetic progression b_{n}b_{n1}=d with constant d. In the construction each segment has the same length.
Prepare your program to display these spirals. The input consists of the number d (real number) and the common length L (positive real number) of the segments. A message should notify the user when all possible line segments have been drawn (that is, when repetition occurs). See the example.
d=24,01 L=1,5
d=177 L=10
The source code of the program (i147.pas, i147.cpp, ...) should be submitted.
(10 pont)
Deadline expired on 15 January 2007.
Sorry, the solution is available only in Hungarian. Google translation
Az alábbi file tartalmazza a feladat mintamegoldását.
i147.rar
Statistics:
