I need to know the algorithm for the following: consider a normal paper, If you fold it by half then you encounter a "V" shape, call it valley. Fold it into half again, Now on opening slightly, you'll see two valleys and one last fold which is opposite to the valley, call it peak. Now I need an algorithm where in 'n' is the number of folds, for which i can print Valley-Peak fold pattern. As in, for n=1, pattern is V. for n=2, The pattern is VVP.
for n=3, pattern is VPPVVVP. Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire