NAVAL POSTGRADUATE SCHOOL
Full text
(2) CP\. NAVAL POSTGRADUATE SCHOOL Monterey, California. Schrady Provost. Rear Admiral R. C. Austin Superintendent. D. A.. This work was supported in part by the U.S. Army Combat Development Experimentation Center (USACDEC) under MIPR ATEC 46-86 and in part by funds provided through the Commodore Grace Murray Hopper Research Chair in Computer Science at the Naval Postgraduate School.. Reproduction of all or part of this report is authorized. This report was prepared by:. MICHAEL J. ZYDI Assistant Professor Department of Computer Science. Reviewed by:. Released by:. \\a*juAk VINCENT Y. Chairman Department of Computer Science. KNEALE T. MARSHALL Dean of Information &. cience.
(3) UNCLASSIFIED SECURITY CLASSIFICATION OP THIS PACE (Whit Data. Entered). READ INSTRUCTIONS BEFORE COMPLETING FORM. REPORT DOCUMENTATION PAGE t.. REPORT NUMBER. 2.. GOVT ACCESSION NO. 3.. RECIPIENT'S CATALOG NUMBER. S.. TYPE OF REPORT. NPS52-87-001 4.. TITLE (and. Subtitle). 6. PERIOD COVERED. final/1 Oct 85. Computer Graphics Interactive Workshop for Two-Dimensional Fractals 7.. i.. AuTHORr«>. CONTRACT OR GRANT. •. -. 30 Sep 86. PERFORMING ORG. REPORT NUMBER NUMBERfa.). o.m-<. Lewis G. Mason Ronald E. Rautenberg Michael J. Zyda 9.. 28 I O O. PERFORMING ORGANIZATION NAME AND ADORESS. Naval Postgraduate School Monterey, CA 93943 II.. N0003986WRDQ200. CONTROLLING OFFICE NAME AND ADDRESS. Chief of Naval Research Arlington, VA 22217 14. MONITORING AGENCY NAME. ft. ADORESSf/f. dlllerant Item Controlling Oltlce). 12.. REPORT DATE. 13.. January 1987 NUMBER OF PAGES 109. IS.. SECURITY CLASS,. (ol thle report). unclassified 16.. DISTRIBUTION STATEMENT. (ol thle Report). Approved for public release; distribution unlimited. '7.. DISTRIBUTION STATEMENT. 18.. SUPPLEMENTARY NOTES. 19.. KEY WORDS. (ol the abetract entered In. (Continue on rovoreo aide. II. ABSTRACT. (Continue on revetee elde. II. Block 20,. II dllterent. Irom Report). nacaeeary and Identity by block number). fractals, Koch-like fractal graphics. 20.. curves, Julia sets, interactive computer. nateeeary and Identity by block number). We present in this study an interactive computer graphics workshop for two-dimensional fractals. The workshop enables the user to learn about fractals through experimentation with the generation of Koch-like fractal curves. A variety of Koch-like fractal curves, Julia sets and the Mandelbrot Algorithms are presented for creating the set are presented as examples. Mandelbrot set and for creating Koch-like fractal curves.. do. ,;:. 1473. EDITION OF $. 86a. $£? VH%. •. MOV. ••. IS. N 0102- LF-014- 6601. OBSOLETE. UNCLASSIFIED SECURITY CLASSIFICATION OF THIS PAGE (When Data. Kntarad).
(4)
(5) Computer Graphics. Interactive. Workshop. Two-Dimensional Fractals. for. $. Lewis G. Mason, Ronald E. Rautenberg and Michael. J.. Zyda. *. Naval Postgraduate School,. Code. 52, Dept. of. Computer. Science,. Monterey, California 93943. ABSTRACT We workshop. present in this study an interactive computer graphics for. two-dimensional. fractals.. The workshop enables. the. user to learn about fractals through experimentation with the generation of Koch-like fractal curves. curves, Julia sets. and the Mandelbrot. A. variety of Koch-like fractal. set are presented as examples.. Algorithms are presented for creating the Mandelbrot set and for creating Koch-like fractal curves.. Key Words and sets, interactive. X. This work. wu. Phrases: fractals, Koch-like fractal curves, Julia. computer graphics;. lupported by the U.S.. Army Combat Development!. Experimentation Center, Fort Ord,. California and a grant from the Naval Ocean Syttemt Center, San Diego (Ref. #. work wu generated from Lew'u G. Maaon't Matter* Thetii. * Contact author.. N0001486WR4B12SAC).. Thii.
(6)
(7) TABLE OF CONTENTS. I.. II.. III.. INTRODUCTION. 7. A.. WHY DO WE NEED FRACTALS?. 7. B.. WHAT ARE FRACTALS?. 7. 1.. What. 2.. The Meaning. are their Origins?. 7. of Fractal. 8. C.. ARE FRACTALS BEING USED NOW?. D.. GOALS OF THIS RESEARCH. 14. :. ABOUT KOCH-LIKE FRACTALS. 15. 17. A.. FRACTAL DIMENSION. 17. B.. THE KOCH CURVE. 20. C.. KOCH-LIKE CURVES. 23. JULIA SETS. AND THE MANDELBROT SET. 26. A.. HISTORY. 26. B.. THE COMPLEX PLANE. 27. C.. JULIA SETS. 28. D.. THE MANDELBROT SET. 30. E.. MAKING PICTURES OF JULIA SETS AND THE MANDELBROT SET. 34. 4.
(8)
(9) IV.. V.. IMPLEMENTATION DETAILS: 2D INTERACTIVE FRACTAL WORKSHOP A.. BACKGROUND. 36. B.. THE MENU ORGANIZATION. 36. 1.. Main Menu. 2.. Interactive Generator Build. 3.. Free. 4.. Fractal Curve Generation. 5.. Re-Run. 37. Menu. 42. Form Options Menu. or. 44. Menu. 44. Dump Bitmap Menu. 46. BUILDING A GENERATOR A.. B.. VI.. 36. HOW TO BUILD 1.. What. 2.. Data Structure. '.. A GENERATOR. information. is. 47. saved about for a Generator. for the Initial. 47. Object. 48. 51. CREATING THE FRACTAL CURVE. 53. 1.. Fractal Curve Generation Overview. 53. 2.. The Algorithm. 54. for Calculating the. Generator Points. WORKSHOP EXPERIMENTS CONDUCTED. 62. A.. INTRODUCTION. 62. B.. DIMENSION VERIFICATION FOR THE FRACTAL CURVES. 62.
(10) VII.. C.. PRETTY KOCH-LIKE CURVES. 70. D.. EXPERIMENTS WITH THE MANDELBROT SET. 78. CONCLUSIONS. 90. A.. SUMMARY. 90. B.. LIMITATIONS. 90. C.. AREAS OF FURTHER RESEARCH. 92. D.. CONCLUSIONS. 92. APPENDIX A. -. THE MANDELBROT SET. APPENDIX B. -. CALCULATING GENERATOR POINTS. LIST. OF REFERENCES. INITIAL DISTRIBUTION LIST. 94. 101. 109. 110.
(11) I.. A.. INTRODUCTION. WHY DO WE NEED FRACTALS? If. you have ever. tried to. draw. a picture of a natural object on a. drawing commands normally found on. graphics terminal with only the primitive. a computer, then you natural object.. know how hard. Why. to create a realistic looking picture of a. it is. Benoit B. Mandelbrot,. this so difficult?. is. coined the term fractals to give a. title. to his. first. who. is. in. 1975. essay on the subject says,. "Clouds are not spheres, mountains are not cones, coastlines are not bark. computer. not smooth, nor does lightning travel in a straight line" [Ref.. circles,. 1:. and. p. 6]. In. general, the objects of nature are not created with the regularity of the Euclidean. primitives.. Clearly then something. and make them look more primitives, lines. and. circles. new. is. needed. realistic.. if. we. are going to. draw natural. objects. The standard Euclidean geometry with. and cones, and three dimensions. is. its. not enough for. either describing or rendering realistic looking objects.. B.. WHAT ARE FRACTALS? 1.. What. are their Origins?. Mandelbrot. is. a. mathematician,. mathematical background to describe. who. fractals.. 7. has. He has. drawn relied. heavily. on. his. on the works from.
(12) the mathematicians of the late 1800s and early 1900's.. This was a period when. several maverick mathematicians challenged the conventional ideas of their day.. These mavericks, whose works Mandelbrot Julia,. at. Fatau and von Koch. the. looked. and. lines that. on as a. "terrifying".. "gallery. However,. in. largely forgotten. In 1975,. had computers. He. required.. The. results. Cantor, Peano, Weierstrauss,. proposed ideas that went against the establishment. They invented. time.. derivatives,. all. uses,. could. ideas. fill. such. as. continuous curves that had no. These functions were. whole areas of a plane.. of monsters",. "pathological",. "psychotic". about 1925 their ideas were placed on the shelf and. Mandelbrot began studying these old "monsters".. also used the precision of. computer graphics to display the. give a visual, intuitive feel. finally. to these. "monsters".. results.. Illuminated by. been recognized as some of the basic. structures in the language of nature's irregular shapes, the "Fractal. 2.. He. to use as a tool for the multitude of calculations these functions. computer graphics, they have. Nature". and even. Geometry of. [Ref. 2: p. 806].. The Meaning. of Fractal. Mandelbrot said he coined the term but self-similar".. He. Intuitively, roughness. simply put, different".. is. "as. fractal to represent. also says that both terms are. is. a measure of. you zoom. in. something "rough. needed to describe. what an object looks. Self-similarity,. like.. and examine any portion,. fractals.. it. doesn't. look.
(13) A. Roughness can best be explained with a few examples. a standard Euclidean object. plane. one dimension and. a standard two dimensional object and. is. about a. wanders around the plane?. line that. does not. the plane either. Roughness. fill. the line and. [Ref. roughness.. A. is. is. not considered rough.. A. What. not considered rough.. no longer a simple. is. is. line, yet. it. a representation of the "wiggliness" of Fractal dimension. formally. is. considered here informally as a measure of. relatively straight line, with few "wiggles" has a roughness greater. and has a. line,. a. is. approximately. 361], but. p.. 1:. than the straight 1.1. is. It. is. related to a fractal dimension.. is. defined in. Figure. in. straight line. relatively. A. 1.06.. line. fractal. straight. dimension greater than line. many. that has. and. has. 1.0.. dimension. fractal. a.. For example,. "wiggles" has a roughness that. of. is. greater than a straight line and also greater than a line with less "wiggles". Figure. 1.2. is. an example of a. "more wiggly" than Figure. line. has a dimension of about 1.26.. As the roughness. all. looking. much. like. a. filled. polygon. in. of the plane.. The same concept. can be applied to change that. is. "crumpled". two but. less. between. 1.0. is. a portion of the plane,. A. it. line. approaches. of roughness or dimension. roughness from a plane. Figure 1.2. with a. filling. between. of. a portion. 1.0. (2.0) to a solid (3.0).. lot. and 2.0. A. plane. no longer a smooth plane, and has a roughness greater than. than three.. and. in. fills. Euclidean primitives.. roughness approaches 2.0 for a fractal dimension as. line in. of a line gets larger, the line. around the plane and almost completely. wiggles. The. 1.1.. In this study,. we concentrate on. 2.0.. 9. lines. with dimensions.
(14) g 01. <L. C _l. z t—. Figure 1.1. Dimension. 10. =1.06.
(15) si. S a. ". E. TD 01. »-H. > CO. u * 5. *"^. / z 5. Figure. 1. .. 2. Dimension =. 11. 1. .. 26.
(16) There are two types of. self-similarity: exact self-similarity. self-similarity.. Exact self-similarity. of construction. make. snowflake (Figure. good example of exact. some. is. achieved. like,. when. the rules. but reduced. in size. the von. Koch. self-similarity. first. statistical. is. proposed. To. in 1904.. of Mandelbrot's terminology needs to be introduced.. There are two main components used is. is. The von Koch snowflake was. 1.3).. describe the snowflake,. "initiator". curve. the curve out of parts that look just. A. from, the original.. for a Fractal. and. the construction of the snowflake.. in. the segment with which you start.. The "generator". is. The. the object that. substituted in for the initiator, properly scaled so the end points of the initiator. and generator are coincident. An initiators.. The. the snowflake. initial. is. object for the snowflake. a straight. segments each scaled to. connected as depicted. generator. is. substituted. segments each being. now. in. —. of the. Figure. —. in. segment. line. 1.3.. Each of the. equilateral triangle.. object. ititial. for. is. The snowflake. infinitely. is. sides of the triangle. initiator.. infinite. many. real. curve that has an exact self-similarity.. number. or more. is. Each. is. four smaller line. line. segment and. created by starting with an. The. considered an initiator and the replacement. numbers there are. is. length of the original. each. of one. a triangle, and the initiator for. The generator. of the original length.. replacements can be repeated an. composed. is. considered an initiator. object. then has 12. line. of the 12 line segments. repeated.. A. is. In theory, the. of times, since for any. two. real. numbers between them. This produces a If. 12. any portion of the curve. is. expanded. to.
(17) ^\. Olfi. i! U-6 UJ. O. </ ^v.. 9 s 3 N m m ^ ® i E. * II ". §. £ &> E. z 5. Figure 1.3. The Koch Snowflake. 13.
(18) an arbitrary magnification. it. same. looks exactly the. as the original curve.. Most. objects in nature do not have this exact self-similarity, they exhibit a statistical. self-similarity.. A with. its. good example of. smaller branches looks a. Another example that bay,. when examined. larger scale.. used. is. lot like. is. a tree.. A. branch of a tree. the trunk of the tree with. in the literature. is. in detail looks similar to. a coastline.. A. under changes of. The key point. is. its. branches.. small segment of a. a large section of a coastline in a. Although the segments being viewed are not exactly. look remarkably similar.. C.. statistical self-similarity. alike,. they do. that fractals exhibit an invariance. scale.. ARE FRACTALS BEING USED NOW? Fractals. are. geometry and sciences.. its. being used now.. Within the. last. five. to. ten years fractal. concepts have become central issues in most of the natural. Fractals can "mimic the activities of the stock market, the motion of. molecules, and the growth of plants.. Consequently their use ranges from physics,. biology,. and sociology, to. p. 157].. Fractals have proven useful in two ways, both describing and acting as a. mathematical model for. art. many. and even motion-picture scene simulation". seemingly complex shapes found in nature.. 14. [Ref. 3:.
(19) GOALS OF THIS RESEARCH. D.. Using fractals would be almost impossible without the aid of computers.. While the formulas creating performed over and. o\. r,. fractal curves are simple, the calculations. must be. each time using the result of the previous calculation.. All but the simplest are calculated millions of times.. made, the rendering of the pictures requires the. Once the. precision of. calculations are. computer graphics. for. proper execution.. Gaddis. states:. There are two approaches that can be taken in the investigation of geometry and computer graphics. - To view the computer as a tool to enhance the investigation of. fractal. fractal. geometry. or -. To view. fractals. graphics. [Ref. 4: p.. In this study,. aid. in. We. 6]. we have chosen. learning. interactive. geometry as a tool to enhance the realism of computer. about. to follow the. fractal. first. geometry. workshop on two dimensional. through. with. experimentation. the video screen.. If. the generator. is. sit at. for inputs, sketch a generator directly. a. onto. satisfactory, the initiator structure can then. be selected and the replacements commenced. indefinitely,. an. fractals.. have created an interactive workshop where an individual can. computer terminal and using a mouse. new. approach, to use the computer to. The replacements can not continue. and we use a termination condition such that when the length of the. initiator. is. less. than one pixel width on the screen the replacement. 15. is. stopped..
(20) The. results can. new generator format. that. be rapidly observed and the experiment can be repeated with a. if. desired.. There. our. laser. printer. is. also a facility to save the results to a. can take as input.. experiments can be saved and compared.. 16. Hard-copy. results. file. of. in. a. the.
(21) II.. A.. ABOUT KOCH-LIKE FRACTALS. FRACTAL DIMENSION The. aimed. following section. not a rigorous discussion of fractal dimension.. an intuitive feeling of a fractal dimension and. at giving. Self-similarity. is. It. is. self-similarity.. the property that a portion of an object examined under an. is. The example. arbitrary magnification looks similar to the original.. often in the literature. is. Looking. the coastline of Great Britain.. shows the entire west coast of Great Britain, and comparing. it. cited. most. at a. map. that. to a. map. that. shows only the south one-quarter of the coast expanded to occupy the same area on a page, the coastlines look vaguely Continuing on. in. the. similar.. They have the same "ruggedness".. same manner and examining an. arbitrary bay, expanding. the view of the bay shoreline, a similarity, the same "ruggedness" Self-similarity. is. observed independent of the viewing scale.. exact self-similarity are invariant under changes of scale.. not exactly self-similar are not invariant, but they. changes of. still. noticed.. Fractal curves with. Fractal curves that are. resemble each other under. scale.. Scaling also affects the length of the perimeter of the island.. the island. is. is. shorter than a walk that closely follows the shoreline.. determined by the walk. is. A. drive around. The perimeter. shorter than the perimeter determined with a set of. 17.
(22) measuring around the island, along the waterline. The smaller the. calipers. measuring. This concept of decreasing. perimeter appears.. scale, the longer the. and increasing perimeter can be transported to. scale. factor. is. space, start with a finite line segment. Divide. smaller version of the original. formula. For example,. closely related to the fractal dimension.. in. one dimension. is. scaled. line,. Nr. 1. =. 1.. into. it. down by. N. in. it. equal parts. Each part. a ratio r. = 1/N. A. is. is. a. general. (Figure 2.1).. it. into. N. results.. a smaller version of the original square, scaled. Begin. (For example divide. equal parts.. into 4 equal parts by connecting the midpoints of each line segment.). part. scale. one dimensional. Using the same idea on a two dimensional object yields similar. with a two dimensional square. Divide. The. fractal curves.. down by. a ratio r =. Each. —. ?-. N (for. our example. N. =. 4, so r. =. —— or r = —. ).. For two dimensions the formula. T 4 is. N r2. =. 1.. (Figure 2.2).. Going one step more into the third dimension follows the pattern already. N. established.. Begin with a cube,. equal parts.. (For example construct 8 equal parts by connecting the midpoints of. each. side.). Each part. scaling ration r. for three. =. —. '8. Nr. sides of equal length.. Divide the cube into. a smaller version of the original cube, scaled. —r^. (For our. N1. dimensions. is. all. 5. =. 1.. example. (Figure 2.3).. 18. N. =. 8, r. =. ,. i.. 8*7*. or r. =. down by a. — 2. .) '. Again.
(23) N = 4. r =. N r. N r1 =. 1. 1/4. = 4(1/4). 1. ==. 1. One Dimension. Figure 2.1. N = 4 r =. N. Nr 2 Figure 2.2. _^. ftZL. <*. ^. =. r. 1/2. 2 =4(l/2) 2 =. 1. 1. Two Dimensions. ^. N = 8 r = 1/2. 3. N r 3 = 8(l/2) = N r. Figure 2.3. 3 =. 1. Three Dimensions. 19. 1.
(24) In general. let. D. if. N. is. of equal parts,. and. r is. the scaling ratio,. represent the dimension and the equation becomes. assume that dimension for D.. number. the. The. result. is. not limited to integer values. N. =. r. we can. 1.. we can. we now. If. solve the equation. is. logN. D. log(-) r. This D, that depends on the scaling ratio and the number of segments,. good measure of the. B.. a. fractal dimension.. THE KOCH CURVE We now. calculations.. Koch curve. return to the. The Koch curve. is. for. our examples. segments.. is. always a single. Each of those four. line. some examples. dimension. of the. created by a recursive replacement technique.. Again we use Mandelbrot's two components, in. is. line. initiator. and generator. The. segment. The generator. segments. is. —. is. initiator. four line. the length of the initiator. For. 3 all. the Koch-like curves, the end points of the initiator become the end points for. the generator.. That. appropriately scaled. snowflake. begins. is,. a single line segment (the initiator). down. with. an. set of line. equilateral. is. replaced by an. segments (the generator). The von Koch triangle.. Each. leg. of the. triangle. is. considered an initiator, thus there are three initiators at the begining of the construction of the curve (Figure 2.4) [Ref.. 20. 4: p. 26]..
(25) INITIATOR N = 4. ~~A. THE KOCH CURVE. Recursive termination distance is. Output medium: Laser printer Resolution: 300 dots/inch. .05 inch.. D T = 1,HB=. 1. 26. Figure 2.4 The Koch Curve 21.
(26) We. begin with the equilateral triangle and replace each of the three initiators. The. with a generator.. picture. now. there are. now. initiators. and the replacement. looks like the perimeter of a star of David,. The. 12 line segments (Figure 2.4).. appropriately scaled. down. done again.. is. generator.. 12 line segments. Each. This process. is. initiator. is. and. now become. replaced by an. repeated an infinite. number. of times.. If. we. assign the value of 1 to each beginning line segment's length, then the. perimeter of the original triangle. perimeter. is. 4.. is. After the. 3.. first. set of. replacements the. After the second set of replacements the perimeter. is. 5. —. .. With. each successive iteration of the replacements, the length of an individual. segment decreases (and approaches without bounds. the early. This. is. 0) while the length of the perimeter. line. grows. the seeming contradiction that the mathematicians of. 1900's found so interesting.. The. results. do not. fall. nicely into the. 'normal' three dimensions of Euclid.. If. we examine. the dimension of the initiator generator relationship,. some. possible answers.. The number. 1/3.. Using these values. in. of line segments. is 4,. the dimension equation gives. D. =. J2£± * log. 3. 22. 1.26. and the scaling. we. see. ratio. is.
(27) This. is. certainly not an integer but then the curve does not behave in Euclidean. fashion.. Figure 2.5. graphics screen.. plane so. The. it is. is. The. resulting picture. certainly not a line, yet. is. somewhere between a dimension. of 1.0. it. does not. and a dimension of. dimension of 1.26. 1.0,. is. fill. a. 2.0.. 1.26 dimension represents a "wiggliness" of the line in the plane.. number grows from. A. an example of the representation of a Koch snowflake on a. As the. the curve begins to "wiggle" through more of the plane.. not very "wiggly" but a curve with a dimension near 2.0. almost becomes a solid polygon.. C.. KOCH-LIKE CURVES All Koch-like fractal curves use the. described above.. have. all. The dimension. same recursive replacement techniques. calculation for a Koch-like curve that does not. segments of the generator the same. segments of the generator are not the same. number.. size. size,. is. not as nice.. is. the scaling ratio. There have been several methods proposed. dimension when the scaling ratio. for. is. Since the. not a fixed. determining the fractal. not constant throughout the generator.. such method uses the relationship between the perimeter length and the the measuring tool.. "When. as. One. size of. using a ruler of size r to measure a coastline's length,. the total length equals the ruler size times the. number. taken tracing the coast.. LENGTH. = rN(r).. 23. of steps of size r, N(r),.
(28) c. f. A. U/W. \*f\r3. ® m n m S OLD. a B-6 Ixl. o. / <\\.. i. ° t g. i. 5. n H. t-H. W. ^ <\. E. z 5. Figure 2.5. The Koch Snowflake. 24. 01. l-l. 01. 5. *.
(29) As. with. LENGTH. the. =. r. snowflake,. -^- =. N(r). -^-p". |Ref.. dimension can be determined from. on. varies. 2:. p.. this equation.. 25. the. 808]. average. The. as. —=r-. approximate. and. fractal.
(30) III.. A.. AND THE MANDELBROT SET. JULIA SETS. HISTORY The Koch-like curves. fractals that. are not the only type of fractal. There are two types of. have been used to produce the majority of the. fractal pictures seen in. the literature. Fractal mountains are generated through the use of "random". Random. fractals.. fractals are the ones that imitate nature [Ref. 3: p. 157].. technique for producing random fractals. is. described in [Ref.. 4].. The. The second type. of fractal produces the dragons and multicolored monsters of the Julia sets and. the Mandelbrot. set.. and the Mandelbrot. Julia sets. that are. sets are fractals. invariant under non-linear transformations. Mandelbrot has used the recursive,. non-linear relation. number 224].. system.. The. rational. C. This function was. formed by. sets. maps. Zn + 1 = Zn +. of the. ,. where Z and. first. this function. complex plane".. were studied. in. [Ref.. 5:. first. 2: p.. "the theory of iteration of. The study reached. When Mandelbrot. as Julia sets.. are elements of the complex. studied by G. Fatau in 1906 [Ref.. with papers by both G. Julia and P. Fatau. become known. C. p.. its. high point. 153].. These. in 1918,. sets. have. started creating Julia set. pictures he says:. We. accumulated beautiful drawings of Julia. really. been. after.. And. extraordinarily beautiful.. in. addition nearly. [Ref. 5: p. 153]. 26. by the bushel. ... It was what Julia and Fatau had. sets. nice to understand intuitively, at long last,. all. Julia sets proved to be.
(31) To. create these beautiful pictures,. we need. to understand a. little. about the. complex numbers and the complex plane.. B.. THE COMPLEX PLANE The complex plane. and imaginary.. All. is. a. two dimensional plane with the two axes labeled. complex numbers can be represented. complex plane and are of the form Z = a + bi real. axis. and b. is. the. .. a. 2. = -1.. \/-l. such that. complex plane. similar to addition in the "Real". components are added. to real. i. h)i.. Z 1 and Z 2. Since. i. The. i. is. a. in. the. number system, except. real. if. Zj = a + bi is. and Z 2 = g + hi then. more complicated. and. is. two ordinary binomials. For example, again. ,. Z 2 x Z 2 = a(g + h)i + b(g + 2. axis.. Addition and subtraction. Multiplication. carried out as the multiplication of. using. the. in. components and imaginary components are added. to imaginary components. For example,. Zj + Z 2 = (a + g) + (b +. a point. the component along the. component along the imaginary. representation of. is. is. as. real. hi). = ag + ahi + bgi + bhi 2. = —1,. Z 1 x Z 2 = (ag - bh) + (ah +. 27. bg)i.. ..
(32) The modulus representing that. number. of a complex. number from. is. a measure of the distance of the point. the origin of the plane.. The modulus can be. calculated by using the Pythagorean theorem,. modulus C.. Zn. |. = v/a 2. |. -f. b2. is. a. .. JULIA SETS. What function. is. The. a Julia set?. Zn + 1 = Z 2 +. becomes Z n + 1 = Z 2 starting value.. Z. .. C. answer. easiest. pick the value for. C. to be. a simple squaring of the. in polar coordinates,. the modulus and double the angle.. If. +. Oi.. The. function then. complex number. Consider the. a modulus and an angle measured from. To. the real axis, representing the point.. For the. simple example.. obtain the value Zq. the function. is. we simply square. iterated time. and time again. there are three possible outcomes.. Z Z modulus of Z. 1.. If. the modulus of. is. greater than 1, then. 2.. If. the modulus of. is. less. 3.. If. origin. the. is. and remains on the. In this example, the. unit circle.. circle forever.. repetitively. circle. and oo. act as attractors. iterations of the function,. basin of attraction of a limit value. is. approach that. in the. is. circle. about the. (Figure 3.1). Z. if. the set of. limit value. In our. all. Z. is. not on the. begins to approach either. and oo attract values, and they each have a basin of. or oo.. oo.. 1,. two values. With multiple. Z n + 1 approaches. then Z n+1 approaches 0. equal to 1, then Z n+1 is on the unit. than. attraction.. numbers that when. The. iterated. example, everything inside the unit. basin of attraction of 0. Similarly everything outside the unit circle. 28.
(33) imaginary. \z. ~"^V. Cu^ ^D. z. v. i. real. ° 1. J. The Unit Circle—^. Z. after multiple iterations approaches Zero.. Z^ after multiple iterations approaches infinity.. Z2 after multiple iterations is still on the unit circle. Figure 3.1. Basins of Attraction in the Complex Plane. 29.
(34) is. in. attractions, for our. If. The boundary between. the basin of attraction of oo.. we. pick a. example the unit. C. circle, is. other than 0, the boundary. and. attractors other than. oo. In. "unending. filigreed. control of the plane [Ref.. 5:. p. 4].. is. set.. not a. such cases, there. attractors for domination of the plane.. they are an. a Julia. the two basins of. is. The boundaries. circle,. and there can be. competition among several are seldom simple, instead. entanglement and unceasing bargaining". The border. from one domain of attraction to another.. It is. regions are an area. for. transition,. c. here in the border regions that the. interesting pictures lay waiting.. There are two major. them connected. The others Cantor. sets.. values of. C. are in one piece and. (in. the function. call. Z n+1 = Z* +. C. ). for. set of all. which the Julia. sets are. 5: p. 161]. THE MANDELBROT SET The Mandelbrot. set. is. a graphical representation of the values of. connected Julia sets result from the iteration of Z n + 1 = Z* +. The Mandelbrot. set has a cardoid. growing from the body. the plane (Figure 3.2).. set,. we. are not in one piece, they are a cloud of points called. Adrien Douady has given the name Mandelbrot Set to the. connected. [Ref.. D.. Some. classes of Julia sets.. set. rings around the. though they are usually the. for. which. [Ref. 6: p. 16].. shaped main body with multiple smaller buds. The Mandelbrot The. C. C. is. the black portion in the center of. Mandelbrot. set are not part of the. prettiest part of the pictures (Figure 3.3).. SO.
(35) Figure 3.2. The Mandelbrot Set. 31.
(36) Figure 3.3. The Mandelbrot Set with Rings. 32.
(37) The that. Z. the modulus of. if. oo [Ref.. and. rings represent an escape time towards. modulus of two.. number. a measure of. is. Z. is. how. in. the basin of attraction of. Z. fast. is. moving toward. oo,. by counting the number of iterations required to reach a. calculated. is. ever exceeds two then. Escape time. 7: p. 77].. Mathematicians have shown. oo.. modulus of two. a. If. of iterations, the point. is. is. not reached within a set. considered to be in the Mandelbrot. maximum. set.. Most. of. the pictures of Julia sets and the Mandelbrot set are obtained by computing the. escape time for each point of the screen, and coloring the point accordingly using. map. a color. If. calculated for. C. a value of. results. If a. maximum. C. value of. is. picked. "If. C. in. is. deformed -. If. C. in. is. infinitely. If. C. is. If. C. is. Mandelbrot. in the. computed.. surrounc one attractive fixed point.. the interior of one of the buds, then the Julia set consists of. many. fractally. and. deformed. circles. which surround the points of a. their pre-images.. the germination point of a bud,. boundary has -. is. C's position. sets.. the interior of the main body of the Mandelbrot set, a fractally. circle. periodic attractor -. the Mandelbrot set. a connected Julia set. in. determines what type of Julia set. -. !. picked outside the Mandelbrot set, 'a disconnected Julia set. is. There are four main types of Julia. results.. set. aesthetic effect. tendrils that reach. up. we have. a. parabolic case: the. to the marginally stable attractor.. any other boundary point of the cardoid or a bud .... we have. a. seigel disk." [Ref. 5: pp. 12-14]. A. seigel disk. is. point on the circle,. an invariant all. circle inside a Julia set.. iterated points derived. 33. That. from that point. is,. if. we. will also. take a. be on.
(38) the circle.. is. E.. of Julia set determines the characteristics of the picture that. produced.. MAKING PICTURES OF JULIA SETS AND THE MANDELBROT SET To. in. The type. create the Mandelbrot set pictures. we. use the function. Zn + 1 = Zn +. C. an algorithm summarized as follows:. Loopl. until all pixels are calculated. Set. Z =. Set. C. +. 0:'.. to the value of the. Initialize a. counter to. complex plane. for this pixel.. 1.. maximum number of iterations Z n ^ = Z\ + C. Calculate the modulus of Z n + Set a. (. 100. is. a good place to start).. Calculate. .. 1. Loop2 until the modulus of Z n + ^2 maximum number of iterations then Set Z n = Zn+1 Calculate Z n + = Z + C. Calculate the modulus of Z n+1 Add one to your counter. End Loop 2 1. or the counter. is. > your. .. 1. .. Establish the color of the pixel based on the counter.. End Loopl. We. establish a correspondence. mapping the region of the complex plane. which we are calculating values to the is. needed. That. is,. we need. a modulus value.. condition for the recursive iteration,. exceeds this. maximum modulus. a value for the color. is. pixels of the screen. Also,. This value. Z n+1 = Z* +. C. .. an escape radius. is. used as a terminating. If. the modulus of. (escape radius) the current iteration. assigned.. If after. 34. for. is. Z n+1. halted and. multiple iterations the modulus ever.
(39) reaches. escape. the. Mandelbrot Chapter. radius,. the. point. set to the attractor at oo.. six includes. some. figures. Z. We. is. considered. to. escape from. the. use the value 2 for our escape radius.. produced using the summary algorithm. listed. above.. To. C. create Julia set pictures, the. same procedure. is. followed except. are picked from the Mandelbrot set and fixed at that value.. to vary over the range of the. A. (Appendix. Mandelbrot. is. complex plane corresponding to the. contains a program written in the. C. then allowed pixel space.. language that produces the. set.). Most of the monster-like. They. Z. values of. fractal pictures are. produced creating Julia. sets.. create pretty pictures, and represent one of the most complicated ideas in. mathematics today.. Julia sets are being studied in such diverse areas as the. dynamics of chaos, and. method. in. for calculating the roots of equations using. Newton's. the complex plane. Readers desiring more information on the uses of. Julia sets and the Mandelbrot set are directed to [Ref.. 35. 5]..
(40) IV.. A.. IMPLEMENTATION DETAILS: 2D INTERACTIVE FRACTAL WORKSHOP. BACKGROUND The program we have implemented. workshop. two-dimensional. for. with. experimentation started by. make. it. a functional. added some. Koch-like. and our goal was. in 1985.. program.. More. fractals.. two-dimensional. Mike Gaddis. an interactive computer graphics. is. In addition to. specifically,. curves.. The program was. to take the partial. making the program. and made the program more robust.. capabilities. allows. it. program and. functional,. The normal. we. steps. involved in executing the program consist of building a generator, or selecting a previously constructed generator from a. one or more. initiators,. recursively replacing. laser printer. B.. is. selected. all initiators. file.. Then an. and the. initial object,. curve. fractal. is. composed of. constructed. by. with generators. The results can be saved for a. and the process can be started again.. THE MENU ORGANIZATION The program. a mouse.. is. a. Our mouse. selections are. through the. mouse button. menu is. made by. selections.. is. released. driven system with selections. made through. the use of. mobile and has three selection buttons on the top. holding. When. down. the middle. mouse button and. the desired selection. and that. selection. S6. is. executed.. is. Menu. scrolling. highlighted, the middle. Throughout the program.
(41) there are on screen displays of the function of each. is. a. menu by menu. The. first. Figure 4.1.. The It. is. description of our program's organization.. Main Menu. 1.. in. mouse button. The following. menu. displayed on startup. There are. first. option. the. menu. MAIN MENU. titled. is. shown. leads to the construction of a. new. generator.. the main feature allowing the rapid experimentation with Koch-like curves.. mode. This. enables the use of the. mouse. for the creation of a. menu. (. generator for use. in. This selection displays a. the recursive substitution of the Koch-like fractal curves. Interactive Generator Build, Figure 4.2).. The second option generator from a. This. file.. every time the program. The of one or. is. of the. mode. is. retrieves. initiators,. "inverse square". is. a previously created. an alternative to redrawing the generator. run.. third option in the. more. Main Menu. Main Menu. from a. file.. retrieves. an. initial object, consisting. For the current system, there are 5. objects: a line, a square, a triangle, an "inverse square",. The. and. Main Menu.. options in the. six active. in. is. denned by the same points. and an "inverse triangle".. as the square but the points. are taken in reverse order. This causes the recursive replacement to be. the opposite side of the triangle". is. defined by the. reverse order.. The. files for. line.. (Figures. same points. 4.3. and. initial. 4.4). Similarly,. the. made on "inverse. as the triangle but the points are used in. the initial objects are. ease in changing the objects with a text editor.. 37. ASCII character. files. to allow for.
(42) HA IN MENU ZD Fractal Workshop. BUILD of Koch-Like GENERATOR GET GENERATOR from External File GET INITIATOR Initial Structure PUT Current Generator in a File DISPLAY Current Fractal EXIT. Systt. Figure 4.1. 38. Main Menu.
(43) 1 Interactive Generator Build. iFreeform (uncontrolled! Draw Lattice. (controlled). |. 1. Draw. Verify Generator Ualidi ty Edit Current Generator. RETURN to MAIN EXIT System. Figure 4.2. Interactive Generator Build Menu. 30.
(44) <. O. ID i-rsj. J. // SLUX < z u u. o. \. \.. 9 m S CD N m ^ ®. 8 t 2 1H Z M. ii. H. L. « ii. e i. ^ < \.. "1. g |. 01. 0). s. ^^ ^ £. z 5 I. Figure 4.3. 40. Triangle.
(45) Olfi. gW-G. Ui. </. 9 s S en ^ ®. 01. ^H 01. B « •-. ii. ". L. r o. 1. H-. ^>. *-•. ii II. Z h-. s g. -^1 <T S. \^\^. 1. > C t—. z 5. Figure 4.4. s L h-. Inverted Traingle. 41.
(46) The use.. Main Menu. fourth option of the. The name. of a. requested, and the. file is. saves a generator to a. saved. file is. in. file. for later. the directory. GENS,. a subdirectory under the working directory.. The. fifth. option of the. Main Menu. the. is. first. Selecting this option causes the Fractal. fractal curve.. step in generating the. Curve Generation Menu. (Figure 4.5) to be displayed.. Accessing the. through a. scroll. and. files. both the generators and. for reading. select process.. The. initial objects is. the generators are stored in the. files for. directory. "GENS". The. "OBJS".. These directories must be direct subdirectories of the same directory. files. for the. initial. The. containing the fractal workshop program.. workshop must be the current. director}'.. objects are stored in the directory'. The. directory containing the fractals. directory contents are displayed in. a scroll and select menu.. 2.. Interactive Generator Build. The. Interactive. Generator Build. expansion of the program (Figure the. way. Menu. 4.2). It. menu is. 1. is. retained primarily for later. displayed as an intermediate step on. to building a generator. Currently there. Selection. is. is. only one active choice.. the option for the interactive construction of a generator.. This selection displays another menu, the Free Form Options. The Return. to. Main. selection returns control to the. selection terminates the. program and. Main Menu. clears the graphics screen.. 42. menu .. (Figure 4.6).. The. Exit system.
(47) Fracta. start. Curve. L. 1. tfSJTI. ?OTimir3?. Fractal Recursion. PAUSE Fractal Recursion RESUME Fractal Recursion LINE POINT. Display Mode (default) Display Mode. EXIT. System. RETURN To Main Menu. Figure 4.5. Fractal Curve Generation Menu. 1 Input. lode. Erase *A11* (clear). RETURN to Build Menu RETURN to MAIN EXIT System. Figure 4.6. Free Form Options Menu.
(48) 3.. Menu. Free F orm Options. The Free Form Options menu generator.. This. menu has. 5 options.. for constructing the generator.. to the. Main Menu. The. The Input Mode option. The Erase. from active memory. The Return Interactive Generator Build. the last step on the. is. way. to building a. displays the screen. All option erases the current generator. to Build. Menu. menu. The Return. to. option returns control to the. MAIN selection. Exit System selection terminates the. returns control. program and. clears. the graphics screen.. 4.. Fractal Curve Generation. The. Menu. "Fractal Curve Generation". menu. controls the creation and display. of the fractal curve. There are seven active selections in this menu. Start Fractal Recursion recursively replaces each initiator of the selected. initial. fractal. object with the selected generator, creating the fractal curve.. curve. is. completed, the Re-Run or. Dump Bitmap menu. When. is. the. displayed. (Figure 4.7).. Pause Fractal Recursion temporarily stops the execution of the program.. The. display on the screen. is. frozen until another option. is. selected.. Resume. Fractal Recursion restarts the program at the point where execution was halted.. Line Display line to. Mode. is. the default display mode.. This causes each initiator. be erased and the new generator to be drawn in fully as. during the fractal curve generation.. 44. line. segments.
(49) Dump Bitmap. RERUN DUMP EXIT. Figure 4.7. Fractal Recursion bitmap of screen System. Re-Run or Dump Bitmap Menu. 45.
(50) Point Display. Mode. displays only the end points of the generator's line. segments as they are calculated. the end points for. new. minimum. than the. line. As long. new end. initiators.. as the. segments are not drawn, there with generators.. initiators. The. is. new end. no need. to erase. final picture. Main Menu drawn. at the. Main Menu, causes. Re-Run. or. or. program.. program to return. to the. in. memory.. is. displayed at the completion of the. There are four options. in this. menu.. Main Menu. returns control of the program to the top level of the. The. curve drawn. fractal. Fractal Curve Generation. the screen.. Both the. menu. initial. is. but the. initial. object. and the. Rerun Fractal Recursion returns control is. file. name. in. to the. erased from. object and the generator are retained in. selection reads the pixels of the screen. file. erased,. (Figure 4.5), and the curve created. bitmap of screen asks for a. that the. different.. and generator are retained. (Figure 4.7).. generator are retained in memory.. Dump. is. control of the. Dump Bitmap menu. generation of the fractal curve.. to. prior to replacing the. Dump Bitmap Menu. The Re-Run. Return. them. Since the initiator. completion of the fractal curves generation. The fractal curve. erased, but the initial object. is. 5.. to. points.. similar to the line display mode,. is. but the display during generation of the curve. Return. points are farther apart. recursion termination distance, replacement generator points. are calculated and displayed between these. line. segment end points become. The generator. memory.. which to save the bitmap.. This. and saves the information necessary such. can be printed on a laser printer.. 46.
(51) V.. HOW TO. A.. A. BUILDING A GENERATOR. BUILD A GENERATOR. generator. is. the set of line segments that. is. used to replace an. build a generator, a rectangular part of the screen. The. initiator. end points are displayed. area, along with. Generator. size. is. a pencil. at the left. is. and. set. up. as a. initiator.. To. drawing area.. right edges of the drawing. shaped cursor that moves within the drawing. limited by the size of this rectangle.. The end. area.. points of the. generator are fixed coincident with the end points of the initiator. Having the end points fixed. makes. it. easier to calculate the other points that define the generator.. Since the end points of the initiator and the generator are coincident, and the end points for the initiator are always known, data. the generator being constructed. defining the generator has. room. of line segments in a generator. When is. the. mouse. drawn from the. is. last. is. moved,. The data for. is. structure that saves the information. 20 points.. Therefore, the. maximum number. 21.. in addition to the pencil cursor. saved point (at the start. to the current cursor position.. not saved for the end points of. Another. position to the generator right end point.. 47. line. is. it. is. moving, a new. the generator. left. line. end point). drawn from the current cursor. These two. lines act as a. "rubber band".
(52) line that follows. the cursor around the drawing rectangle. This allows the viewing. of potential generator segments without actually designating points.. The. three buttons on the. When. generator.. is. added to the generator. complete and control generator. is. in. band". of the "rubber. is. segment. is. set. last. is. left. until. The saved point becomes. mouse button. erases the last point. mouse button says that the generator. Form Options menu.. of line segments.. The. end point, to the. the last saved point. last. new. the. final. segments are drawn. line. first. The. is. saved point, then the. reached.. The. final. line. saved point to the right end point. The. line. is. saved point to the cursor position and then to the right. end point are not included Figure 5.1. The. right. left. drawn from the. segments from the. pressed, the current cursor position. returned to the Free. consecutively starting at the. etc.. is. the generator.. line.. The. composed of a. second saved point,. are used to control options for building the. mouse button. the middle. saved and becomes a point. start. mouse. in. the generator.. a partial screen bitmap, and indicates that information. is. being. saved for three generator points. The small picture of the generator indicates that the two line segments from the last saved point to the current cursor position, and. then to the right end point are not included 1.. What In. direction,. information. screen. is. saved for a Generator?. coordinates,. and 250 units. in the generator.. in the. Y. the. drawing rectangle. direction.. 48. The. is. 200 units. size of a generator. is. in. the. restricted. X by.
(53) Point. is set. in. data structure. GENERATOR. - _ , .. (9,1). (9,9). Ratio_Init_Perp. 9-8499. Angle A; Rads- 9-1477. Di st .Ratio. 1-4154. An 9 le A; De 9 s. 8-4649. 9.1Z59. Tansent of A. X 9-8499. Y. Num of Gen. Pnts Fractal D mens on i. Figure 5.1. i. 3 1. .. 3344. Building a Generator. 9.1488.
(54) this. drawing rectangle. The distance between the generator end points. units. This information. is. used. in. 200. is. determining information to define new generator. points.. It is. X. easy to determine the. X. The. cursor position.. and. Y. Y. and. coordinates for the saved points from. coordinates are then used to calculate information. necessary to construct a generator from any two arbitrary end points defining an. initiator.. Having the. fixed. X,. Y. coordinates for a generator point. information to determine where that generator point initiator that. generator. is. build.. different in size. What. is. and orientation from the. needed. the. is. positioning of the generator point, given only. The. relative. located between the. away from the is. two. point until the generator point. lies. is still. two arbitrary. initiator. is. first. to. be placed.. the. relative. end points.. We move. only. X. and. Y. moved when. line.. We. save a ratio of. the generator point. is. on the. Knowing. anywhere along the perpendicular. coordinates and the initiator line. position in the plane, the. X. and. Y. is. moved. coordinates are not valid for the. 50. far. a line that. not sufficient information to determine where the generator point. lie. is. end point towards the second end. the distance between the initiator end points.. be placed. The generator point can. we use. to .determine. on the perpendicular. the distance the perpendicular line has. ratio. fixed situation of the. end points, and angles to determine how. initiator. initiator the generator point. line, to. ability. be placed for an. measures we use are a ratio of where the generator point. perpendicular to the initiator from the. perpendicular. to. is. not enough. is. this. is. to. line. If. to another. new generator.
(55) point.. If. we use. perpendicular. the distance from the generator point to the initiator along the. line,. that distance. not valid for an initiator that. is. We. shorter than the fixed size generator build initiator.. need to know a relative. To. positioning to determine where to place the generator point.. where along the perpendicular. line the. generator point. For calculating where the generator point. lies. is. we. first. end point to the perpendicular. line.. connecting the. is. end point and the generator point.. also calculate the angle. formed by the. end point and the generator point.. To. in. initiator. We 7. define a generator point,. most situations. placed.. We. memory. to represent an angle. call. 2.. and the. we save. We line. a ratio of. call this. The. angle $.. We. connecting the second. <f>. (Figure 5.2).. movement between <j>.. One. where the generator point. save two angles to handle special cases.. Data Structure. the distance. end point to the. first. the second angle. to determine. is. use a. This relative measure, a. end points and we save information about the two angles $ and sufficient. we. angle formed by the initiator and the line. the tangent of the. first. use angles.. we know. distance along the perpendicular over the distance from the. perpendicular. discriminate. to be placed,. relative distance along the perpendicular line, given that. from the. longer or. is. The data. that. we. the. angle. is. is. to be. store in. the tangent of that angle.. for the Initial Object. initial objects are. represented by a set of points (X,. and a number representing the number of points represented by up to 25 points.. The. object. 51. is. in. the object.. Y. An. coordinates),. object can be. created by starting at point one and.
(56) Drawing Rectangle. Generator Point EndGen line Gen line. Perpendicular Movement I. T—l 1 _ _ Initiator line *.. A.. Total Length. = Angle between Gen line and the initiator = Angle between EndGen line and the initiator. ratio =. Perpendicular Movement Total Length. Figure 5.2. Defining A Generator Point. 52.
(57) drawing a etc.. line. segment to point two, then drawing a. This procedure. A. reached.. is. segment to point three,. carried out until the last point in the object has been. closed object requires a repeated point.. requires four points, with the. B.. line. first. For example, a triangle. and the fourth point the same.. CREATING THE FRACTAL CURVE 1.. Fractal Curve Generation Overview. The program. We. recursive.. for. generating. assume that an object. the. is. composed. segments). Each of the original initiators. memory.. defined in. length. is. The. calculated for that initiator.. initiators,. minimum. minimum. When. examined.. minimum. of one or. more. with. dealt. is. in. If. distance.. is. and. initiators (line. If. the initiator. is. new. initiator. repeated recursively.. all. is. The. the length of an initiator being less than. We. use one pixels width for a. minimum. the recursion terminates, the next initiator at the current level. This continues until. is. composed of new. the length of the. distance, the process. is. iterative. the order they are. calculated.. This replacement generator. terminating condition for the recursion or equal to the. both. distance, a replacement generator. and they are handled consecutively.. greater than the. distance.. is. length of the initiator. greater than a specified. is. curve. fractal. is. the initiators of the original object have been. considered.. The heart. of the. replacement generator.. program. is. an algorithm that calculates the points. for a. Using this algorithm, given any two arbitrary points. 53.
(58) representing the end points of an initiator, a set of generator points. is. determined.. These generator points are scaled and oriented such that a generator replaces the initiator.. The. They. calculations are not complex.. are basic trigonometry. and. geometry calculations. However, they are carried out many times. 2.. The Algorithm. for Calculating. Generator Points. This algorithm assumes that the X,. Y. coordinates of the initiator end. Since the end points of the initiator and the replacement. points are known.. generator are coincident, they are referred to only as end points.. method. determining the new generator uses the. for. two end points and the. ratios. X. and. Y. The. general. coordinates of the. and angles information that defines the generator.. Using this information, we find the equations,. in. terms of the. X. and. Y. values of. the generator point, of two different lines passing through the generator point.. We. Y. solve these. two equations to. of the generator point.. the initiator. is. find the values of the. Once the. functional program requires.. is. Y. all. is. X. and. coordinates have been determined,. The algorithm. of the checking for special cases that a. An example. of a special case that needs to be. the prevention of division by zero in an equation.. the workshop uses checking.. and. erased and the lines for the generator are drawn.. being described here does not do. handled. X. two unknowns, the. The function. that. included in Appendix B, and does the necessary special case. Figure 5.3 summarizes the steps of the algorithm.. 54.
(59) Repeat. for all generator points.. Calculate the distance between end points. Calculate the slope of the initiator. If. saved ratio for this generator point does not equal. begin. then. if. Calculate. the. point. of. P pepp. intersection,. of. ,. the. Perp,. line,. perpendicular to the initiator and through the generator point.. Iff = then the generator point. is. P perp. .. else. begin. else. Calculate Slope gen of the. line,. Gen, through the. first. end. point and the generator point.. Calculate the *. unknown. Y. intercept of the line Gen.. — ^*°P e gen x -^unknown. "gen-. '. Calculate Slopeperp. Calculate the *. unknown. end else end if ratio else ratio = begin. Y. intercept of the line Perp.. = ^*°P e perp x. + D gen-. -^-unknown. =. not. else. Calculate Slope gen for the. line,. Gen, through the. first. end point. and the generator point. Calculate the. Y. intercept for the line Gen.. ^unknown = Slope gen X X unknown + b gen Calculate Slope endgen for the line, endgen, through the second end point and the generator point. .. Y intercept for the line endgen. unknown — ^'°P e endgen x -\inknown "endgen-. Calculate the *. end. '. =. else ratio. Solve the two equations and determine a value for. Use the value. for. Y unknown. in. Y^^o^.. one of the two equations and solve. -^unknown End Repeat. All the. X. and. Y. values for the generator point are. Figure 5.3. Algorithm. for Calculating. 55. now known.. Generator Points. for.
(60) Unlike. replacements an. the. Koch snowflake that can. von. infinite. number. we use a. of times,. termination condition for the replacements.. We. stop the recursion. less. is. the. first. specified. P2. P1. minimum. distance, the recursion stops. However,. and. second end point. label the. first. step. the two points. For simplicity. end point. ,. when. .. DIST. If. DIST. if. the. than the distance. The. that can be displayed in one pixel on our viewing screen.. DIST, between. it's. machine and need a. finite. distance between two end points (any arbitrary initiator). determine the distance,. continue. theoretically. we. is less. is. to. label. than a. greater than. is. the terminating distance, the points for a generator are calculated to replace the. initiator. The similar.. it. P2. between the points. We. P2. and. steps to calculate the. X. and. determine the slope of the. Slope init. the slope of the initiator.. .. Y. values for each of generator points are. connecting points. lire. Y. 2. -*». the ratio of. movement between. and. P 2 ,and. call. .. Slo P e init = r=. If. P2. points. P2. - Yj ~. and. =T-. A. l. P2. is. not. then. we. calculate the. point of intersection on the initiator of a line through the generator point that. perpendicular to the initiator.. has values. Xperp and Y perp. This point. is. called the perpendicular point. .. Xperp. =. X. 2. + savedRatiox(X 2 -. X2. ). Y perp. =. Y. i. + savedRatiox(Y 2 -. Yx. ). 56. is. and.
(61) Then the angle generator point. X perp. are. do. this,. and. lies.. Y perp. is. If. $ =. If. .. the point. call. it. Slope gen. We. 7 and. Pj and the generator. Y. $.. point,. values. Px. To. and the. and the. line. X. axis.. We know. use Slope init as the tangent of the angle 7, the. X. axis.. Tan(7 + Slope gen. 0). .. We is. determine the tangent of the. the slope of the line connecting. Figure 5.4 indicates. sum. how 7 and. two angles. of. are. to determine. .. find the. Y. intercept,. b gcn. + tan7 - tan* x tan7. tantf. „, = Slope_gen en. We now. Y. and. the. use the knowledge that the slope of a. positioned to allow us to use the tangent of the. Slope gen. X. line. values must be calculated.. formed by that. angle formed by the initiator and the. point. and. We now. .. also the tangent of the angle. of the two angles,. X. and the. initiator. the slope of the line connecting the point. Slope init and we know tan0.. sum. on the. is. not 0, the. is. we must determine. generator point,. line. used to determine where along the perpendicular. is. 1.0. ,. for the line. through Pj and the generator. point.. bgen. =. Yx. This gives us an equation for the. - Slope gen line. x. X. 2. P2. through point. generator point.. * unknown. — ^*°P e gen * -^unknown. 57. '. "gen. and the unknown.
(62) Initiator/1. Slope initiator. = tan 7. = tan (6 + 7. Slope. ). Gen Slope. Figure 5.4. Gen-end. = tan. (. 7 -. ). The Angles and Lines defining the Generator. 58.
(63) We. also. know. that the slope of the line perpendicular to the initiator. -1.0. Slope perp. point for the perpendicular. Slope ir. X perpi Y perp. Using Slope perp and the point. is. we can determine. the. Y. intercept. line.. Y perp. D perp =. X perp. - Slope perp x. This gives us the equation for the perpendicular. line. .. through the unknown. generator point.. *. unknown. ~~. ^*"P e perp. -^unknown. '. Thus we have the two equations with two unknown. Y unknown-. Solving these equations for. -. values,. X unknown. and. X unknown we get D perp _ D gen. Xunknot. slope een - Slope t. X unknown. Using this value for. gen. in. either of the. two equations, we determine. y* unknown* Y Unknown The. X. and If. Y. = ^^°P e gen x. X unknown. coordinates for the generator point are. the ratio. the generator point. through the point. a different method. is 0,. P2. lies. .. $. on a is. line. is. + b gen. .. now known.. needed.. If. the ratio. is. 0,. we know. perpendicular to the initiator and passing. ±90° and. will. 59. not define a unique generator point..
(64) The. slope of the line connecting the point. s,ope. We now. find the. Y. intercept,. -=. b gen. P2. and the unknown generator point. Slo^T. for the line. ,. is. through. P2. and the unknown. P2. and the unknown. generator point.. bgen. =. Y2 -. This gives us an equation for the. Slope gen x. line. Xr. through point. generator point.. ^unknown = Slope gen x ^unknown +. We now. use the angle. P2. connecting the point. calculation of. <t>.. Slope gen. We. determine the slope, Slope endgen. and the unknown generator point. Slope« ndg€1, =. find the. Y. .. of the line. similarly. to. the. .. 01. We now. "gen-. intercept,. b gen. ,. ——j—j. tanfl. — tan^. for the line. through. P2. and the unknown. generator point.. b endgen =. Y2. This gives us the equation for the. and point. P2. ~ Slo P e endgen x. line. X. 2. unknown generator. connecting the. .. *. unknown. — ^'°P e endgen x -^unknown 60. '. "endgen. point.
(65) Thus we have the two equations with two unknown. Y unknown-. Solving these equations for. X unknown. we. "endgen. ^unknown. Using this value. Xy^^^. for. 01. S1 °Pe en g. in. values,. X unknown. and. get. gen. 01 - SloP^endgcn. either of the. two equations, we determine. * unknown. *. The process. This. is. is. X. and. Y. When. A. all. line. all. "endgen-. X. Y. and. now determined. The. values for the next generator point.. the generator points.. of the points are. is. +. values for the generator point are. repeated to determine the. continued for. generator.. unknown ~ ^^°P e endgen x -^-unknown. known, we replace the. drawn from point. initiator. to point, in order, creating the generator. with the proper orientation and scaling.. The. recursion. is. continued using the. calculated points as the end points for the next level of initiators.. initiators. have been replaced to their lowest. passed to the Re-Run or. Dump Bitmap. with a new. levels,. menu.. 61. the picture. is. When. all. of the. done. Control. is.
(66) VI.. WORKSHOP EXPERIMENTS CONDUCTED. INTRODUCTION. A.. We. have now introduced two programs that construct. curves and the Mandelbrot. set.. It. is. time to show some of the results that have. been obtained from these programs. Figures are products of our experimentation.. verify. a. property. the. of. program,. Koch-like fractal. Some i.e... and. 1.1. 1.2. 1.3. 2.5 discussed. above. of our experiments were conducted to. dimension. calculations.. Some were. conducted to construct "pretty" pictures and some were conducted just to see. what would happen. An. interactive. workshop allows. this flexibility.. DIMENSION VERIFICATION FOR THE FRACTAL CURVES. B.. The equation we use. for the fractal. dimension. Fractal Dimension =. D. in. log. =. log. the generation of fractal. N. (-; r. N. is. the. number. of line segments in the generator. these line segments.. when. all. and. r. is. the scaling ratio for. This produces excellent results for the fractal dimension. the line segments that compose the generator are equal in length.. their lengths are not equal,. we. When. calculate an average length for the line segments to. 62.
(67) compute the fractal. scaling ratio.. dimension when the. This causes our results to be an approximation for the line. segment length. varies.. There are several generators with equal length dimension. verification.. The Koch generator. segment of the Koch generator. —. is. line. segments that we use. one of these.. is. for. Since each line. the original length and there are four line. S segments, the dimension should be. D. p± ». =. 1.26.. log 3. Figure 6.1. is. the fractal curve.. the. It. Koch generator used with. has a fractal dimension of 1.2610.. generator, with a triangle as the. Koch snowflake. a single initiator for constructing. Figure 6.2. is. the. same. This combination produces the. inititial object.. discussed earlier.. Figure 6.3 has a generator that. segment has a scaling ratio of. —. .. constructed of 8 line segments, each line. is. The dimension. is. 4. D. =. JO! -. 1.5. log 4. When object,. the generator with a fractal dimension of 1.5 the fractal curve constructed. constructed with the. Koch. is. with a fractal dimension of. 1.5.. The. generator with a fracal dimension of. used with the. more "wiggly" than the. We. generator.. is. line initial. fractal curve. also create a variant of the generator. variant generator looks identical to the. 1.5,. 63. but. it. is. constructed with seven line.
(68) c o <s> l/t. m n m £. V GENERATOR. kochl.ZG. A. ®. L 3. i. t—. Z N ". 1. a. n. <L. E. U E. QJ. C. O. —1. i—. $ QJ. 1—. z 5. X. I. Figure 6.1. 64. Koch Line.
(69) ID. c o. ^ n m m ^ • <s>. _j ro LD OM. hrr. .. GENERI. kochl. y. iJi. L 3. Sfl. g P t-. ii. A/. i. X^. <. 0) 1-1. at. (J). 5. o > 0J. 2 £. X a. c. Figure 6.2. Koch Triangle. 65.
(70) tt. 5 E UJ 19. GO II. i W. |. z 5. Figure 6.3. 1.5 Line.
(71) segments instead of eight. —. ratio of. ratio. now. is. and one. line. line. Six of the line segments have a scaling. segments.. segment has a scaling. ratio of. —. .. The average The. .2857 and results in a higher fractal dimension, 1.5533.. fractal curve (Figure 6.4). is. constructed with 9. line. resulting. even more "wiggly" than the fractal curve constructed. with the generator that has a fractal dimension of. Another generator that. scaling. is. 1.5 (Figure 6.3).. used to verify the fractal dimension. segments,. all. with a scaling ratio of. the generator. is. —. The. .. fractal. 3. dimension should be. D. J2*£ =. =. log. The generator segment. is. Figure 6.5. in. —. about. 2.0.. 3. constructed of nine line segments.. is. The minimum. the length of the initiator.. Each. line. resolution for. 3. generator points. in the. workshop. .005 units, and. is. —. is. approximated with the. 3 value. .335.. We. calculated. dimension of 2.01, close to (Figure. 6.5).. The. segments exactly. —. inability. that. 2.0.. the generator in. The. of our. Figure 6.5. fractal curve almost. program. the original length. is. to. construct. an entire polygon the. generator line. the reason for the gaps in the polygon,. 3. and the deviation from the dimension being exactly. 67. fills. has a fractal. 2.0..
(72) in 00. Ln L". •. 1. at +i. ^-. I lj Ln L3. 1. •. II. |. z 5. Figure 6.4. 1.5 Variant Line.
(73) N n s e. s. •. 1.. "I5. m 07 II. C |. z 5. Figure 6.5. 2.0 Line.
(74) PRETTY KOCH-LIKE CURVES. C.. We now We. turn to some of the prettier Koch-like curves. we have. constructed.. begin with a very simple generator and with only minor changes in the. generators. We. we. get. some. drastic changes in the fractal curves.. construct a simple generator of two equal length line segments forming an. inverted. V. The. object. as expected, a simple almost cloud-like fractal curve (Figure 6.6).. is. even more. result looks. an. the. like a. when. cloud. this generator. is. The. used with a square for. object (Figure 6.7).. initial. The. resulting fractal curve constructed with a single line initial. fractal curve in Figure 6.8. was. result. This was the. sentimental reasons. printer.. With only a. slight. another example of a fractal curve in which. This. predicted.. as. is. fractal. is. fractal curve that. first. change. curve. included. we. partially. for. printed on the laser. in the generator, the results are a. complete. surprise (Figure 6.9).. Figures 6.10 and 6.11 are similar generators with only small perturbations in the line segments of the generator.. although quite pleasing to view.. The. results are again surprisingly different,. With the exception of Figures. 6.2. and. 6.7 all of. the fractal curves within this chapter so far have been constructed from a single. line. as. an. segment. an. initial. initial. initial. object (one initiator). These curves constructed with the line. object run faster, and are simpler than those curves constructed with. object. composed. of. more than one. complexity to the pictures (Figure 6.12).. 70. initiator.. Adding. initiators. adds.
(75) CO. /. K. H<c. gco. B. LP. ®. 1. ^ 1.. I. " (. n. \. \. ii. ". \. \. g. g ^ E. z 5. Figure 6.6. 71. A Line.
(76) CD. / /. 5. m 2 s ® &. /. <x. z Ul L9. (. \ \. i. i. N. g |. N. \. z 5. Figure 6.7. 72. A Square.
(77) « ffi <*•. K. ®. B ^. u 5 h-. II. 2£. <Z. t—. m. /. /. ii. z. g |. z 5. Figure 6.8. 73. First Line. c _l.
(78) \. R. ^t&r<&. *N. at*.. &v|. %Lj%£1^. m CO II. c o 1. J. £ 8 B. in. ttj. s. 8 GENERATOR. <E Colleen. 01. c. o. t-H. z t-H II. f 1. gj. E. l-H. z 5. X. i. £. Figure 6.9. 74. Colleen Line.
(79) "0 «-. cu. >. prj. a. /. B. U si z 3. S. ^ ®. ,H «M. /. <r. t—. z. / 1 1. /_. ii. ". & E. z 5. Figure 6.10. 75. Wave Line. 01. c.
(80) 89. / r^ Vww*^'. X. %^. "D. *44Juyv. ffl. 01. ®. LP. •. ... |. B* *z. "I. m z. H. g 01. z 5. UNK. L. Figure 6.11. 76. Spiral Line.
(81) g I—. QJ. It. z. hH. Figure 6.12. Meagan Square. 77. 1.
(82) Additional "inverse. variations. square". "inside-out".. symmetry. objects.. Figure 6.14. ability to. fractal curve. is. 6.13. is. is. constructe. make. often. not. is. and. Koch snowflake. the. triangle. and the. using the triangle. initial object. initial. and Figure. initial object.. small changes to a generator and watch the resulting. both entertaining and informative.. what. This. triangle". generator sometimes negates the use of different. in the. grow. curve will look.. expected. is. is. The. resulting fractal. Part of the enjoyment of. intuitively.. the attempt to predict. not an easy task, particularly. is. more complicated (Figure. when. how. the resulting. the generators are. 6.16).. EXPERIMENTS WITH THE MANDELBROT SET The Mandelbrot. in. "inverse. the. Figures 6.14 and 6.15 look the same. This shows. experimenting with the fractal curves. D.. Figure. constructed using the "inverse triangle". The. curve. negligible.. is. that the. is. objects.. initial. using. Sometimes though the difference between using the. "inverted triangle". 6.15. the. for. by. achieved. are. set. program we have implemented has an. and examine small sections of the complex plane. in detail.. ability to. With. "zoom". apologies,. we. present black and white replicas of the figures that on the computer graphics screen. are. Mandelbrot. most. alive. in. color.. set pictures. is. A. large. of the. time spent constructing the. spent constructing a color scheme that presents the. aesthetically appealing picture.. pictures justice.. part. The black and white. To examine some outstanding. 78. color. replicas. do not do these. Mandelbrot and Julia. sets.
(83) ® sfi • -E. Si. <\. M. U. 0) i-H. en. i. e g. i—i. Z N. 1. <. L. ^. 1. > C t—. |. z 5. Figure 6.13. Koch Inverted Triangle. 79.
(84) Ifl. CD. s §. 8"?. 01. 1 ^ z u 13 1. " CD II. INITIATOR. o U U. A. 2 5. Figure 6.14. 80. 1.5 Triangle. I L. 1—.
(85) If). 01. g. 0). g h-. 1"!. oc. *. o. GO. g. II. 1. z t—. c (0. <. L. >-. 1. > c 1—. 2 a. Figure 6.15. 1.5 Inverted Triangle. 81.
(86) u>. S /. s. ®. II. / 1. /'. §. / E3. /. 4_. >. z 5. Figure 6.16. 82. Anns Line.
(87) the interested reader that are used to. Figure 6.17. is. make. directed to (Ref.. 5].. A. of regions in the complex plane. beautiful pictures can be found in [Ref. 5: pp. 193-196].. the Mandelbrot set without any magnification, or any of the. is. colored rings with which. it. surrounded.. is. Each colored ring represents a. points that reach a modulus of 2 after the. function. list. Z n + 1 = Z n + C. Figure. 6.18.. we. rings. where the points reaches. same number. 6.18 includes. a. modulus of. of iterations of the. some the colored. print every other colored ring for the. first. to the. eight rings.. That. much. plane displayed. from. -2.0 to. is. those. is,. 2 after 2. 4. 6 or 8 iterations.. Mandelbrot. high level picture and does not display. In Figure. rings.. points that reach a modulus of 2 after 8 and before 100 iterations are. and are the portion adjacent. set of. Figure 6.18. set.. detail.. The portion. is. left. The. white,. a relatively. of the complex. a rectangular region, from -2.0 to +2.0 along the real axis and. +2.0 along the imaginary. axis.. Figure 6.19. complex plane, but with every other color up to 50. is. the. same portion. of the. iterations displayed as black.. Colors for 50 to 100 iterations are displayed as white.. Figure 6.20. Mandelbrot. set.. is. a close up of a small portion at the end of the "antenna" of the. The portion. -1.935 along the real axis,. of the. and from -0.005. Every other color up to 50 iterations. from 50 to 100 are. left. part of the Mandelbrot. complex plane displayed. white.. is. The black portion. 83. from -1.945. to. to +0.005 along the imaginary axis.. displayed as black.. set.. is. Colors for iterations. in the center of the figure. is. a.
(88) Figure 6.17. The Mandelbrot Set. 84.
(89) Figure 6.18. The Mandelbrot Set (8 Rings). 85.
(90) Figure 6.19. The Mandelbrot Set (50 Rings).
(91) Figure 6.20. Antenna of the Mandelbrot Set. 87.
(92) Saving the best for. last,. Figure 6.21. is. the most aesthetically pleasing picture. up. we have produced. Again every other. color. colors for 50 to 100 iterations are. white.. graphics work station. bands of. iterations,. is. with. left. of. map. 33. The. to. The. color. is. displayed, and. scheme used on the. designed to provide gradual changes in color for. maximum. color contrast at the border of the bands.. portion of the complex plane displayed. and from 0.0. to 50 iterations. is. from -1.781 to -1.768 along the. +0.13 along the imaginary. axis.. This figure. is. Iris. five. The. real axis. a recreated version. in [Ref. 5: p. 80].. figures presented here are not. produced by the two programs. There that can be constructed.. We. an is. all. inclusive set of figures that can be. an almost unlimited number of pictures. present here only a few illustrative examples.. 88.
(93) Figure 6.21. [Ref. .. 5:. 89. p. 80]. Map 33 Rendering.
Related documents
The variation of the impact strength of the No b alloy in the cloverleaf castings with a reduction of the form heating and of the superheat depends not only on the moderate change
Clearly, these postpulses are strongly attenuated by the plasma produced by avalanche ionization over a short distance (2-3Z r ). Further downstream of the focus, at z=11.2 m,
We previously were able to measure the fundamental rovibrational bands of NO and other species over only a limited set of wavelengths at moderate
A number of other topics in distributed and Monte-Carlo estimation were also considered including: distributed information fusion under unknown correlations; large-scale
The thrust for this program constitutes of three major areas of turbulent combustion: (1) Flame surface statistics, (2) Flame-turbulence interaction, and (3) Effects of turbulence
the in such a manner as to permit easy transition to a more sophisticated, picture oriented, graphics language such as PLOT 80 which would permit an interactive graphics employment
The research reported here was supported by the Director, Net Assessment and Competitive Strategies Office and Strategic Planning Branch, Office of the Secretary
helmet may induce during the parachute drop phase of escape and to obtain the possible test parameters for further live tests, a series of simulated drops were performed