import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; public class DocumentShape { Manager M; public DocumentShape(Manager MM) { this.M=MM; } public void shapeInfo() { String S="shape entry system"; S=S+"\n\nBiliard King investigates outer billiards on kites. A kite is a convex quadrilateral with an axis of bilateral symmetry containing opposite vertices. Our kites are normalized so that the vertices are\n\n(0,1)\n(-1,0)\n(0,-1)\n(A,0)\n\nwith A in (0,1). The blue shape at the bottom of this control panel shows a kite. This shape will change according to the parameter you select. All the information about the shape of a kite is contained in the choice of A. Billiard King only works with rational choices of A. However, this control panel gives you different ways of specifying a rational number. There are 3 options."; S=S+"\n\n basic: Here you use the keyboard to enter a rational number. The 'reduce' button converts the rational into lowest terms if it is not already in lowest terms. You can also click the 'random' button. This will generate a random rational whose denominator is at most 400. Finally, the arrow keys let you increment or decrement the numerator by 1. This is a useful feature if you want to observe some geometric quantities, such as the strips, varying with the parameter in a fairly continuous way."; S=S+"\n\nquadratic irrational: This option lets you enter in a quadratic irrational parameter, and then take a suitable rational approximation. For whatever value you choose, an integer is added so that the result lies between 0 and 1. The display is initially set to sqrt(5), which determines the value sqrt(5)-2. This is the parameter for the Penrose kite. You can decide if you want to approximate the number by odd rationals, by even rationals, or both. We call a rational p/q odd according as to whether pq is odd or even. When you choose the 'both' option, the approximating rationals come from the continued fraction expansion. When you choose the 'odd' or 'even' options, the approximating fractions are not necessarily continued fraction approximants, though they are related. If you push the 'send' button, this causes Billiard King to remember your rational selection when you switch selection modes."; S=S+"\n\n monograph: This option corresponds to the conventions and constructions in the monograph. You enter in a rational number directly, as in the basic case, and then there are many ways to manipulate the rational. These manipulations all have to do with the approximation sequences constructed in the monograph. This option has its own separate documentation. When you select this option, you can click on the info button to see more information."; S=S+"\n\nThe tilings associated to A are very complicated even for very simple A. We recommend that you operate the tiling window with caution for rationals with denominator greater than 30. Mainly, you should use the 'whole orbit' feature with caution. You can produce very long orbits every for small-denominator rationals."; M.E.setExplain(S); } public void shapeRational1() { String S="monograph mode"; S=S+"\n\nThis is the documentation for the monograph mode of the rational parameter entry window. There are now a number of rational numbers present. Using the arrow key next to the info button you just clicked, you can cause a pointer to point to the different rationals. This will tell you the names of them. Try doing this now. When you push the arrow key repeatedly, the pointer moves around in a circle."; S=S+"\n\nmain parameter (A). This entry is the for all selection modes. It is the actual kite parameter. You can either enter the parameter manually, using the keyboard, or else by one of the methods discussed below. When you select a value rational number, one that is between 0 and 1, Billiard King computes several other rationals. These other rationals are all related to the sequences constructed in the monograph. They have to do with continued fractions and the Farey graph."; S=S+"\n\nThe parameters A+ and A- are the two simpler rationals such that A is the farey sum of A+ and A-. That is, the denominator of A is the sum of the denominators of A+ and A-, and likewise for the numerator. We have A- infinity, the rational C converges to A, and the arithmetic graphs corresponding to C seem to have an asymptotic shape."; S=S+"\n\nThe memory parameter: Sometimes you might want to remember an initial parameter while doing all these operations. If you click on the grab button, you store the main parameter in the memory location. If you push the send button, you replace the main parameter with the parameter in the memory location."; S=S+"\n\nThere is a number that appears between the main parameter and the swap parameter. This number is the Diophantine constant of the two rationals, as explained in the Chapter 22 of my monograph. Here is the explanation. Let A1=p1/q1 be the main rational and let A2=p2/q2 be the secondary rational. Then there is some number a such that |A1-A2|=2/(a q1^2). The number a is what is displayed."; S=S+"\n\nmodular console: Let r1 be the main rational. The orange colored fields let you specify another fraction r3 and (using the arrow key) an intgeger m. Recall that the modular group is the group of integral 2x2 matrices with determinant 1. These elements act on the extended real line by linear fractional transformations. When you use this console, you assign r2=T(m+r3) to the magenta fraction. As N tends to infinity, these fractions converge to r1 and the Diophantine constant tends to infinity.\n\n"; M.E.setExplain(S); M.E.repaint(); } public void shapeRational0() { String S="This is the basic documentation for the rational parameter entry window."; S=S+"\n\nThis window lets you enter rational parameters for the kite. The pink entry fields are where you enter the parameter. Henceforth we call this the 'main rational'. The top entry field is the numerator and the bottom one is the denominator. Once you have selected the mail rational, you should push the 'X' button to get the fraction into lowest terms. Many of the features of Billiard King might malfunction if the fraction is not in lowest terms. The fraction you enter should be between 0 and 1. After you enter a fraction, you should press the `reset all' button to make sure the new parameter is recorded."; S=S+"\n\nThis window has a basic mode and an advanced mode. If you turn on the advanced mode, there are many additional features."; M.E.setExplain(S); M.E.repaint(); } }