Brief
description of the algorithm:
Step 1
|
|||
| Step 2 This step actually is called often again. The action applied is replacing all pairs of equal or opposite sequences with a pair of sides in the corresponding direction. For instance if we have ...1, 2, -3, 4, ..., -4, 3, -2, -1, ... the result will be ...1, ..., -1, ... |
|||
| Step 3 This step also is called often again. The action applied is simplyfying the polygon by removing all appearances of X, -X where X stands for a random number. It is clear that when just remove this pair the polygon will remain the same. At this step the algorithm can finish. This will happen if the polygon consists of only two sides. Then, if they are opposite, the surface is sphere. |
|||
| Step 4 This is the most complicated step in the process. The task is to cut-and-paste the polygon in order that there remains only one vertex. So the first thing to do is to label the vertices in some manner, count them, and if there are more than one of them, perform the action. The exact cut-and-pasting is rather cpmplicate to explain in text but, for instance, it will take the sequence 1, ..., 1, 2, ...., 2, ... to the sequence 1, ..., 3, ...., -1, 3, .... This is actually cutting from the beginning of 1 to the end of 2, labeling the new side 3, and sticking the two parts along 2. This will increase by 1 the vertices labeled equally with this at the beginning of 1 and descrease these at the end of 1. Note that the applet would rather label the new side 2 than leave it 3. This saves time to check that the number 3 is free (there is no other side labeled 3 or -3) and moreover, keeps the numbers of the sides small which means that the pisture is better looking. |
|||
| Step 5 On this step the twisted pairs are collected together. Once being together they form a projective plane. This is done again by cut-and-pasting. The sought configuration is something like this 1, ...(X)..., 1, ...(Y)... and is replaced by 2, 2, ...(Y)..., ...(-X)... where X and Y are seqeunces. The actual cut is from the end of 1 to the end of the other 1. The program will again ignore the numbers and will label the new side 1. |
|||
| Step 6 This step is rather the same as the previous with the only difference that it collects together the opposing pairs. The steps till now guarantee that this can be done and the collected sides will form a torus. This time we seek for 1, ...(X)..., 2, ...(Y)..., -1, ...(Z)..., -2, ...(T)... and replace id by ...(Z)..., ...(Y)..., 1, 2, -1, -2, ...(X)..., ...(T).... |
|||
| Step 7 Here everything is put together. The only essential transformation is replacing each torus by two projective planes if needed. Some of the labels of the sides are changed for better understanding of the final result. |