Going around under and through circles: mathematics and computer art; part 3. Sheldon P. Gordon; Florence S. Gordon.
In two previous articles, we have discussed the properties of some strange and fascinating mathematical curves known as hypocycloids and epicycloids. In both cases, we started with a large circle of radius A and a smaller circle of radius B. To form a hypocycloid, we traced out the path traversed by a fixed point on the smaller circle as it rolls around the inside of the large circle. (See Figure 1.) To form an epicycloid, we traced out the path formed by a fixed point on the smaller circle as it rolls around the outside of the larger circle. (See Figure 2.)
In each case, the use of computer graphics allowed us to discover some remarkable properties of these curves while at the same time generating some lovely and artistic patterns and shapes.
Both of these types of curves were originally discovered because of a characteristic outlook of mathematicians--the type of curiosity that is always asking "What happens if...?" For example: what happens to a point on a circle rolling around another circle? The answer to such a question was a major project for the mathematicians of the ancient world. With the aid of the modern computer, though, we can answer the same question in seconds, generate far more details, and observe interesting relationships.
In this article, we will look at several further possibilities relating to epicycloids and hypocycloids and see some more mathematical patterns as well as the artistic shapes that result. The Epicycloid Reconsidered
First, let's consider the epicycloid again. We said that it is formed by tracing the path of a fixed point on a circle as it rolls around the outside of a larger circle. But, what happens if the rolling outer circle is actually larger than the inner circle?
The picture we had in the previous article on the epicycloid (Creative Computing, June 1984) were generated by a graphics program which drew the graphs of the curve given by the two parametric equations: X = (A+B) COS(T) - B COS((A+B)T/B) Y = (A+B) SIN(T) - B SIN((A+B)T/B)
In these expressions, B is the radius of the rolling outer circle, and A is the radius of the fixed inner circle. The program doesn't care what A and B stand for; it just plugs their values into the two formulas, calculates the location of the (X,Y) point, and graphs it. Therefore, we can supply any values for A and B to the computer that we want. For instance, we can let B = 2 and A = 1. The result is the heart shaped curve shown in Figure 3. Similarly, if B = 3 and A = 1, we obtain the result in Figure 4. Further, if B = 4 and A = 1, we get the epicycloid shown in Figure 5.
Those of you who have read the previous articles in this series are undoubtedly already counting the number of arches and cusps (the sharp points in the diagrams). It turns out that with all of these curves, the number of cusps is directly related to the values of the two radii. Thus, in Figure 3, there are two cusps and two arches corresponding to B =2 and A =1. In figure 4, there are three cusps and arches with B = 3 and A = 1. Finally, in Figure 5, there are four cusps and arches with B = 4 and A = 1.
If instead you try B = 5 and A = 2, you obtain the shape shown in Figure 6. In this, there are five cusps and five interconnected arches. However, to complete the full curve requires that the rolling circle rotate through two full revolutions about the fixed inner circle. Similarly, if you use B = 8 and A = 3, the resulting shape will contain eight cusps, but will require three full revolutions about the inner circle, as shown in Figure 7. On the other hand, the shape for B = 20 and A = 6, as seen in Figure 8, looks exactly as you would by now expect for B = 10 and A = 3. The common factor of 2 in the radii 20 and 6 essentially is removed when forming the shape of the epicycloid.
All of these curves are perfectly realizable in the sense that a larger circle can roll around the outside of a smaller one. However, it is literally impossible for a larger circle to roll around inside a smaller one if we were to attempt the same type of extension with the hypocycloid. It just can't be done physically or geometrically. But, what happens if we ignore the fact that this is impossible and proceed blithely to give the computer such values? The equations for a hypocycloid are: X = (A-B) COS(T) + B COS ((A-B)T/B) Y = (A-B) SIN(T) - B SIN((A-B)T/B)
In these expressions, it is tacitly assumed that B is smaller than A. However, if we give the computer the values B=2 and A=1, it doesn't know that there is no physical significance to these numbers. It doesn't care that they are supposed to represent radii of circles. The computer just puts these values into the two formulas and grinds out the corresponding graph, which is shown in Figure 9. Similarly, the shapes for the pairs (A,B) = (outer,inner) = (1,3) and (1,4) are shown in Figures 10 and 11. In the last two graphs, you will probably notice that the center of each shape contains the same heart shape as for the pair (1,2). Similarly, the pairs (1,5) and (1,8) also contain this shape at the center surrounded by an ever increasing complexity of arcs. See Figures 12 and 13.
Now, let's look at the pair (2,3), whose graph is shown in Figure 14. The pairs (2,5) and (2,7), as shown in Figures 15 and 16, contain the same central shape surrounded also by a variety of ever complex arcs. Notice, by the way, that we skipped over the pairs (2,4) and (2,6)--they just reduce to the same shapes as (1,2) and (1,3) respectively.
Furthermore, all pairs having A = 3 will contain a spade shape at the center as shown in Figures 17 and 18 for the pairs (3,5) and (3,8) (assuming that there are no common factors to cancel and reduce the shape). Mathematical Questions
Additional patterns for the shapes generated should be fairly predictable by now. However, there are several questions of a mathematical nature which are not easily answered. First and foremost, you have undoubtedly noticed that some of these last few figures of supposedly non-existent hypocycloids look amazingly like some of the earlier pictures of epicycloids. In particular, the matches are:
(1,2) Figure 3 (1,3) Figure 10
(1,3) Figure 4 (1,4) Figure 11
(1,4) Figure 5 (1,5) Figure 12
(2,5) Figure 6 (2,7) Figure 16
what gives? To be honest, we reacted the same way when we began writing this article. The matching shapes are not something known to every mathematician. Remember, we did say at the beginning that computer graphics gives the mathematician the opportunity to learn new things about his subject. The above table does suggest some possible relationships, though. For example, the epicycloid with (1,N) will probably give the same shape as the hypocycloid with (1,N+1) for any integer N. (Is that true if N is negative? Hmmm.) But what about the epicycloid with (2,5) versus the hypocycloid with (2,7)? For that matter, the epicycloid with (3,8) is certainly related to the hypocycloids with (3,5) and (3,8), though neither one is quite identical. What value of N in the hypocycloid with (3,N) will be the same as the epicycloid with (3,8)?
Further, what is the general pattern relating epicycloids and hypocycloids? We leave these points for the interested reader to ponder and answer by some judicious experimentation, with the appropriate programs. (These questions can also be answered using a fair amount of algebraic and trigonometric manipulation, but that approach is decidedly less exciting.)
There are some other open questions regarding these curves that are also worth considering. In the previous situations, there was a clear relationship between the number of cusps and arches and the values for the radii. In the current case, there does not seem to be an obvious connection. Can you deduce such relationships? For that matter, is there any connection betweent the radii or the number of arcs and the number of points of intersections between the arcs? Answer these questions and you will be well on your way to becoming a true mathematician.
What makes these shapes even more interesting is watching how they are actually formed by the computer. When you look at the finished products, you might come to the conclusion that the inner shape is formed first and then the outer loops are traced out around it. This is not at all the case. Rather, the curves loop around repeatedly and, on each revolution, contribute a small portion to the central figure. It is only as the full diagram is completed that the central figure is completed as well. The Programs
To get a feel for this, it is almost essential that you run the actual programs. Therefore, we have included here simplified listings that will enable you to produce all of these non-existent curves. The programs are designed for the TRS-80 Color Computer with Extended Basic; however, it is fairly easy to modify them to function on most other small computers with graphics capabilities. From that point on, you can interpret the results either as a series of intriguing and artistic shapes or as a challenge to discover some new mathematical principles.
If you chose the first alternative, then a limitation in the programs will allow you to generate even more striking artistic effects. To produce the graphs relatively quickly, the programs use a maximum of 400 subdivisions of the full curve. When the sizes of the radii are relatively large, however, the programs generate only approximations of the correct curve. These approximations can produce some truly remarkable shapes, as demonstrated in Figures 19, 20 and 21 for the pairs of radii (1000,5000), (2500,10000) and (2222,8888).
What is even more dramatic is the dynamic way in which all of these pictures are generated on the computer. In an article such as this, it is simply impossible to include all (or even any) of the strikingly beautiful intermediate stages that are produced on the screen on the way to creating the final figures shown. That is something that really must be experienced. Further, it is an experience that can be reproduced at the push of a button.