Cake slice flipping

The mathematical puzzle

Consider a cylindrical cake, its top surface white and its bottom surface black.
We will repeatedly cut out a slice of the cake, of angle theta, invert it, and
replace it. The cake is made of icecream so the slice will immediately weld
itself back seamlessly into place. The left edge of each slice will coincide
with the right edge of the previous slice, so we will work round and round the
cake.

After how many slices will the cake be entirely white on top again? Is this
number necessarily finite?

The program

This page links to a program which you can use to experiment with various angles.

Use the form to specify, in degrees, the size of the slices you want flipped.
You should also change the "name" to something other than "default", otherwise
your cake may get mixed up with someone else's.