import java.applet.Applet; import java.awt.event.*; import java.awt.*; import java.awt.geom.*; class TextUse { /**This is a documentation file. It is read by the file reader.**/ public TextUse() {} public String getText(int k) { if(k==0) return(text0()); if(k==1) return(text1()); if(k==2) return(text2()); if(k==3) return(text3()); if(k==4) return(text4()); if(k==5) return(text5()); if(k==6) return(text6()); if(k==7) return(text7()); if(k==8) return(text8()); if(k==9) return(text9()); if(k==10) return(text10()); if(k==11) return(text11()); if(k==12) return(text12()); if(k==13) return(text13()); if(k==14) return(text14()); if(k==15) return(text15()); if(k==16) return(text16()); if(k==17) return(text17()); if(k==18) return(text18()); if(k==19) return(text19()); if(k==20) return(text20()); if(k==21) return(text21()); return(null); } public static String text0() { String S="OVERVIEW: This program has a central plotting window and peripheral controls. Obviously, this window contains the text. Now we'll go through the components of the program one at a time."; return(S); } public static String text1() { String S="TEXT CONTROL: (left bottom) The 'text' control panel selects the unit of text that appears here. You should probably read the text in order."; return(S); } public static String text2() { String S="PRESETS: (left bottom) The 'presets' control panel puts the program into pre-chosen states, so as to demonstrate certain features of the program. The 'introduction' text refers to some of the options on this control panel. Exercise: The 'polygon' button is the only preset configuration we haven't mentioned yet. Press this button, then press 'reset'."; return(S); } public static String text3() { String S="MODE: (left bottom) The 'mode' control panel toggles between 3 possible modes for the program. The 'pinwheel' mode is the main, and fully functional, mode. The 'strip' mode illustrates the strip map. The 'outer' demonstrates the outer billiards map. The 'strip' mode doesn't show much unless some of the strips on the 'pinwheel manager' are activated. Pressing the 'strip' button on the 'presets' control is the easiest way to do this. "; return(S); } public static String text4() { String S="SCALING: (left middle) There are two ways to automatically scale the picture, which we call 'tile fit' and 'poly fit'. It is best to experiment to see what these do. First press the 'theorem' button, to call up a good picture. Now try each of the two scaling modes. The 'reset' button resets the scale to the initial value."; return(S); } public static String text5() { String S="ANIMATION: (left top) When the program is in certain states, the 'go' button will turn pink. When this happens, you can activate the animation by pressing it. For instance, after you press the 'theorem' button, the program is in one of these states. The 'speed' buttons control the speed of the animation. You can change the speed while the animation is running."; return(S); } public static String text6() { String S="POLYGON SELECTOR: (left top) We start with a regular polygon and then randomly perturb it. The top squares control the number of sides. The bottom squares control the randomness in the perturbation. Each button click calls up a new polygon. In the odd case, the left button specifies 0 randomness. In the even case, the left button specifies a very small amount of randomness. We do this because we don't want parallel sides."; return(S); } public static String text7() { String S="After you have selected a polygon, you can modify it in a different way. Move the mouse near a polygon vertex and press key-v. This moves the nearest vertex to the new location. This feature allows you to create non-convex polygons, but the program doesn't work correctly when such polygons are selected. If you mess up with this feature, just re-select a polygon using the polygon selector."; return(S); } public static String text8() { String S="PLOT WINDOW: (center) You select a point on the plot window using mouse button-2. You should select points outside the polygon to see the intended effect. You can scale in and out of the picture using mouse button-1 and mouse button-3. If you don't have a 3 button mouse, you can use the keys z,x,c in place of the mouse buttons. The strip at the top reminds you of the keyboard shortcuts."; return(S); } public static String text9() { String S="EXERCISE: In pinwheel mode, turn on the 'regions1' button at top right. Select points in various regions. Notice that region you click lights up in red. The image of this region under the outer billiards map lights up in blue. Check this by switching to the 'outer mode'. Now switch back to pinwheel mode. Any additional tiles that light up are images of the red tile under the special strip maps that arise in our main theorem."; return(S); } public static String text10() { String S="EXERCISE: Put the program in 'outer' mode and play around with point selection and scaling. Do the same thing for 'strip' mode. In the case of 'strip' mode, you will get a nicer picture if you first press the 'strip' button on the 'presets' control panel."; return(S); } public static String text11() { String S="COLOR SELECTOR: (top) You select a color either by clicking on the little colored squares or by clicking on the 4 sliders. The top 3 sliders control the red, green, blue values of the color, and the bottom slider controls the transparency. The central rectangle displays the current selected color. "; return(S); } public static String text12() { String S="COLOR CONTROL: (top right) You can chance the colors of various of the objects by clicking on the squares on the 'colors' control panel. The newly assigned color is the one that appears on the color selector. If you are unhappy with your color choices, the 'reset all' button returns them to their originals. Exercise: try out some color changes."; return(S); } public static String text13() { String S="SHOW: (top right) This control panel toggles the display of several graphical objects. As mentioned in the introduction, the 'regions1' object shows the regions of constancy for the square outer billiard map. The 'regions2' object shows the regions of constancy for the inverse of the square outer billiards map. These regions are organized naturally into wedges, which the 'wedges' buttons display. Use the 'wedge1' and 'wedge2' arrows in tandem with the wedge displays."; return(S); } public static String text14() { String S="EXERCISE: First press 'reset' on the 'preset' controls. Now turn on the 'regions1' and 'wedge1' displays. Use the 'wedge1' arrow keys at bottom left to cycle through the wedges. Observe the organization of the picture. Zoom way out of the picture to get a better appreciation of the wedges."; return(S); } public static String text15() { String S="EXERCISE: Press 'reset', then put the program in pinwheel mode and turn on both 'regions' buttons. Now select a point in one of the regions. Observe that the red tile fits perfectly with the red-outlined regions1, and the blue tile fits perfectly with the blue-outlined regions2. This is as it should be, given the descriptions of the objects. The other displayed tiles, if any, are not so clearly related to these regions."; return(S); } public static String text16() { String S="PINWHEEL MANAGER: (bottom right) The pinwheel manager controls various features of the display. We have already mentioned what the 'wedge1' and 'wedge2' arrow keys do. Now we will go through the remaining features on at a time."; return(S); } public static String text17() { String S="STRIPS: (pinwheel manager) These two columns of squares control the display of the special strips mentioned in the introduction. The left column of squares toggles the strip display and the right column lets you select the strip colors. Initially, they are set to dark grey. When you select a point in pinwheel mode, the strips light up in a way is that is synchronized with the displayed tiles."; return(S); } public static String text18() { String S="SPOKES: (pinwheel manager) As we discussed in the introduction, pp11-12, each special strip has a vector assigned to it. We call the segments determined by these vectors 'spokes'. Each spoke joins an endpoint of a polygon edge to a vertex that is farthest from the line extending the edge. The spokes buttons control the display of these vectors in the same way that the strips buttons control the display of the strips. "; return(S); } public static String text19() { String S="OPACITY: (pinwheel manager) The two rows of squares labelled 'tile opacity' and 'strip opacity' control the transparency of the colors assigned to the strips and to the colors of the corresponding tiles plotted in the big window."; return(S); } public static String text20() { String S="ARROWS: (pinwheel manager) The 'which strip' arrow keys advance the display of the strips sequentially. As we already mentioned above, in connection with the 'show' control panel, the 'wedge1' and 'wedge2' arrows advance the display of the wedges sequentially."; return(S); } public static String text21() { String S="EXERCISE: Press the 'theorem' button on the 'presets' control. Now click the 'which strip' arrow keys repeatedly. Observe how each colored strip is situated with respect to the same-colored tile. Note that the each strip and tile of the same color have disjoint interiors. This means that the corresponding special strip map acts nontrivially on the tile and moves it to the next tile. Now press the animation feature and compare the strip display."; return(S); } }