FRACTALS. Week 13 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on a lab by James Barker. Pre-Laboratory Checklist

Size: px
Start display at page:

Download "FRACTALS. Week 13 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on a lab by James Barker. Pre-Laboratory Checklist"

Transcription

1 FRACTALS Week 13 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on a lab by James Barker Pre-Laboratory Checklist vvskills: You can handle any recursive, or higher order function. vvknowledge: You understood basic computational complexities and can design programs accordingly. vvyou have read the laboratory text below. Introduction The notion of recursion has been fundamental to the course so far. You have learnt to use recursive functions and recursive data types to solve problems. In this lab, you will use this knowledge to explore and create images of fractals, geometrical objects that are deeply recursive in nature and are therefore amenable to work with in Haskell. Important Note This week s lab is intended as an enjoyable exercise, and is not directly examinable. As this may be one of your final chances to speak to your tutor face-to-face, you should also ensure that you raise with them any issues or problems you have encountered in any of the previous labs. Interlude: The Koch Snowflake Many of you will have seen pictures of fractals before. They are a standard trope of computergenerated art and imagery beautiful, complex, and mysterious, and yet they can be created through the repeated application of very simple rules. (This kind of behaviour is often referred to as emergence the Wireworld assignment is another example of emergent complexity derived from simple rules.) But what exactly is a fractal? A proper mathematical description is difficult, and well beyond the scope of this course (those of you who go on to study advanced mathematical analysis topics like measure theory will find fractal ideas popping up). For our purposes, a fractal is a geometrical object that exhibits self-similarity at different scales. If you look closely at a fractal, you will see the same or similar kind of structure and shape as you would see looking at it from a distance. In this lab, we will use some simple sets of rules to progressively transform simple geometric objects (lines, triangles, etc.) into self-similar images of fractals. (Note that this is certainly not 1 ANU College of Engineering and Computer Science May 2015

2 the only way to produce fractal images!) The first example we will construct is the so-called Koch Snowflake. To see how this works, we begin with a straight line, like so: Although trivial, this will be the starting point that we will use repeatedly to build up a more interesting image by applying a transformation rule. This rule can be stated as: Dilate (i.e. shrink) the picture by a factor of 1/3. Make three more copies of the dilated picture (so there are a total of four copies of the same image). Translate and rotate these copies according to the following diagram: (0,0) (1/3, 0) (1/2, ( 3) / 6) (0,0) 60 (1/3, 0) (2/3, 0) (1, 0) After this rule has been applied once, we have obtained a degree-1 fractal. (The original line we started with is, therefore, a degree-0 fractal.) To obtain a degree-2 fractal, we recursively apply the same transformation rule to the degree-1 fractal. Higher-degree fractals can be generated by this recurrence relationship, with the degree-0 fractal as a base case. I have provided code to produce and display the Koch snowflake at varying degrees of complexity. Obtain the Snowflake.hs file from the course website. Compile and run this code, and have a look through it if you like. Do not attempt to run it through GHCi, as the code s performance will be poor. (You will need to ensure you have an up-todate version of the Gloss graphics library installed on your machine. If you are working in Windows, you will need to place the glut32. dll file from Assignment 1 in your working directory. If you experience problems, talk to your tutor.) 2 ANU College of Engineering and Computer Science May 2015

3 Experiment with different degrees of complexity. What do you notice about the time it takes to calculate higher-degree fractals? How might this algorithm scale, informally or in Big-O notation? (The actual Koch Snowflake of degree n is created by first producing three fractals of degree n starting from straight lines, as above. These are then glued together in a triangle shape. I didn t mention this above to avoid confusion, but you can see it immediately from the degree-0 case in the code provided.) It is interesting to note that technically, the images you are producing are only approximations to the Koch Snowflake fractal. The actual (infinitely complex) fractal is only obtained when you take, in some sense, the limit of the shape as the degree approaches infinity. If you are interested in a more detailed derivation of what a fractal really is and how it can be manipulated and reasoned about, you might like to investigate the later-year mathematics course Math3062: Fractal Geometry and Chaos Dynamics 1. Interlude: Gloss Data Types A Quick Primer This lab revolves heavily around the use of Gloss, a Haskell library for producing and displaying simple images and animations 2. You have already seen Gloss used to display the Wireworld simulation in the first assignment, but this is the first time that you have actually had to work with it programmatically. Although simple by real-world standards, Gloss is still substantially larger than any library you have yet had to work with. It is not necessary for you to understand most of what offers in order to complete this lab; however, it is necessary to discuss one particular recursive data type the Picture. Here is the standard documentation for the Picture type: The first few constructor entries will make obvious sense polygons, lines, circles, etc. To specify a circle with radius 1, for instance, you would write the Haskell literal expression Circle 1.0. (You might like to load Graphics.Gloss.Data.Picture up in GHCi, and investigate the types of some simple Picture expressions.) The next three (Text, Bitmap, and Color) can be ignored by you for now. The final four are recursive, and more interesting. They provide a way for you to manipulate and combine Pictures into other Pictures. The Translate, Rotate, and Scale constructors represent exactly what they say on the tin, and the Pictures constructor wraps a list of other Picture elements. So the following is a completely legitimate expression of type Picture: Pictures [Translate (Circle 1.6), Scale (Translate (-10.0) 10.0 (ThickCircle ))] You should deconstruct this expression and work out what it specifies. Also, those of you with some experience in geometry and/or linear algebra will recognise that the order of operations is important something translated and then rotated will probably not be the same if the rotation is performed before the translation. Why do we need this data type? To eventually display an image on the screen, it must be passed into a particular function as a single element of type Picture. 1 This is a highly-recommended general-interest course, and not one that requires a great deal of mathematical knowledge to enjoy although HPO students will certainly have the opportunity to flex their muscles. The lecturer, Michael Barnsley, was one of the leading figures in the rise of fractal geometry during the 70's and 80's; he, along with John Hutchinson (another maths lecturer/researcher at the ANU) were responsible for the theoretical development and practical application of various fractal-based techniques, including a fascinating method of image/data compression that offered insane compression ratios, at the cost of highly-expensive encoding algorithms. This system fell by the wayside (and provides an interesting example of early problems with software patents), but remains an interesting component of the history of information compression. 2 Gloss was originally developed at the ANU by Ben Lippmeier, a former researcher here. He still actively maintains and improves the software. 3 ANU College of Engineering and Computer Science May 2015

4 Exercise 1: The Sierpinski Sieve Your first task is to produce code to display another family of fractal approximations. The fractal being approximated is the Sierpinski Sieve one of the most common and elegant fractals around, and quite possibly one that you have seen before. The degree-0 case for the Sierpinski Sieve is a single, filled triangle, traditionally oriented to point upwards. The transformation rule is simple: Dilate the ^n -1h degree fractal by a factor of 1 2. Create two additional dilated copies of the ^n -1h degree fractal. Translate these copies so that their left-hand points touch the upper- and right-hand point of the first copy, respectively. Visually, this can be displayed as shown: (1/2, ( 3) / 2) (0,0) (1,0) To begin, take a copy of my Snowflake.hs code above, and give it a sensible name (i.e. Sieve.hs). With the exception of the function named main, which you probably won t be able to make heads or tails of, you should be able to read and understand all of my code. (As explained previously, IO in Haskell is complex and we will not be discussing it here.) Create new code, similar to mine, to produce images of the Sierpinski Sieve at varying degrees of complexity. Check with your tutor that your solution is correct. Exercise 2: The Heighway Dragon Having implemented an easy fractal in the form of the Sierpinski Sieve, we now turn to a more complicated example: the Heighway Dragon. (Those of you who ve read Jurassic Park will recognise this fractal.) 4 ANU College of Engineering and Computer Science May 2015

5 The degree-n Heighway Dragon is, again, a simple straight line. The transition rule is as follows: Dilate the (n-1) degree fractal by a factor of 1 4. Create three additional copies of the (n-1) degree fractal. Rotate the (four!) copies of the (n-1) degree fractal by: 90c counter-clockwise, 180c clockwise, 90c clockwise, and 180c clockwise. Rearrange the four copies as shown in the diagram below. The distance to translate the sub-fractals of degree ^n -1h during production of a fractal of degree n is in units that are dilated by 1 2 each time. The base case for this (i.e. the degree 1 fractal) requires translation in units of the original line length divided by 4. This isn t as complicated as it sounds. Note that the orientation and order of the copies is important. This diagram shows the creation of fractals up to order 3. The arrow-heads are included to make the process clear. Create a new script file, Dragon.hs, that can draw images of the Heighway Dragon. Again, this code will be very similar to that which you ve worked on before. Check your answer with your tutor there are several subtle ways to get this wrong, so be careful. Submit your code to the SubmissionApp under Lab 13 Dragon. 5 ANU College of Engineering and Computer Science May 2015

6 Interlude: The Mandelbrot Set and Escape-Time Algorithms Most of you will probably have seen an image of the famous Mandelbrot Set, a fractal that was discovered by (and named after) Benoit Mandelbrot. Mandelbrot was arguably the most important pioneer of fractal geometry, and his recent death was a great loss to mathematics. However, whilst almost everybody recognises the Mandelbrot Set, few people actually understand how it s derived. I have written some simple Haskell code to allow you to visualise and explore the Mandelbrot set. Obtain the script files Diver.hs and Mandelbrot.hs from the course website. Compile and run them with the following command: ghc -O3 Diver.hs Execute the compiled binary. What you are looking at is a visualisation of a region of the complex plane, bounded by! 20. and! 2i (as you are informed by the text in the corner). So where do the pretty patterns come from? Informally, a complex point c is within the Mandelbrot set if (and only if) the sequence obtained by repeated iteration of the recurrence relationship zn = z 2 n 1 + c z0 = 0 -, is bounded (i.e. can always be contained within an origin-centred circle of finite radius). Of course, we are talking here about complex multiplication and addition. For example, picking c = i provides the following infinite sequence of terms, called an orbit: z0 = 0 z1 = i z2 = i z3 = i z 4 = f If you continue repeating this process, you will find that the points z n in the orbit diverge quite quickly to infinity, in the sense that the distance between them and the origin grows rapidly larger. In fact, it can be proved that if this orbit ever leaves the circle in the complex plane with radius 2 and centred on the origin, then it cannot be bounded and is therefore not in the Mandelbrot set. On the other hand, it is rather easy to see that c = 0+ 0i must be in the Mandelbrot set, because the sequence of terms obtained by infinitely iterating z n is 0, 0, 0,... and therefore bounded. Less trivially, setting c = i (the imaginary unit) provides the orbit 0, i, ^- 1+ ih, - i, ^- 1+ ih, - i,..., which cycles and can be bounded by an origin-centred circle of radius 2. So, returning to the actual image, each pixel corresponds to a sampled point on that plane that is used as a value for c in the above recurrence relationship. Pixels are usually coloured black if they are within the Mandelbrot set. As you can see, the interesting fractal stuff happens on the boundary of the black area. If you left-click your mouse anywhere on the screen, the image will redraw and zoom in on the point you clicked. (Be patient, it takes a few seconds to do each redraw.) Right-click to zoom out again. Try diving down on the boundary, and observe that even as the observation window onto the complex plane gets smaller and smaller, the complexity of the boundary only increases. 6 ANU College of Engineering and Computer Science May 2015

7 But what do those colours actually mean? Where do they come from? The standard way to colour a Mandelbrot visualisation is by something called an escape-time algorithm. Each pixel is coloured according to how quickly the complex value associated with that pixel diverges to infinity (and black if it doesn t, i.e. if it s within the Mandelbrot set). Pixels far away from the boundary of the set diverge very quickly, and are coloured lightly. Pixels very close to the boundary often tend to oscillate around that boundary for a while before packing their bags and heading to infinity, so they are coloured darker3. If you re paying attention, you might be wondering: we ve worked out how to identify points that are not in the Mandelbrot set, but can we always identify those that are? There is no obvious guarantee that their orbits will ever cycle, as in the case of c = i above. If we kept testing recurrence sequence terms for a point in the Mandelbrot set, we would never observe them heading to infinity but we would never run out of points in those sequences, and could never be quite sure that the next one wouldn t finally high-tail it towards infinity, so the computation time might take quite a while(!). We get around this by establishing a maximum iteration count, and conclude that if an orbit hasn t left the immediate neighbourhood of the Mandelbrot set by that many iterations, we can just assume that it s in the Mandelbrot set. Feel free to spend some time playing with my code. You might like to inspect it and try and work out how it works most of it should make reasonable sense to you. (Note that the infix :+ operator assembles a complex number z out of two real numbers x and y.) As is often the case with this kind of program, the amount of code required to actually do the Mandelbrot set calculations is minimal, only a few lines; most of the code goes towards defining and maintaining the sample region displayed in the window. Exercise 3: Julia Sets A final exercise for the very keen, and indeed, an open extension. Spend some time investigating my Mandelbrot set code. There are other fractals that can be visualised using an escapetime algorithm. One collection of such fractals are the so-called Julia sets. A Julia set can be obtained by reversing the logic of the Mandelbrot code. The same recurrence is used; however, escape times are not calculated by choosing the constant c according to the pixel being investigated and starting the recurrence from z0 = 0. Rather, the constant c is fixed to some arbitrary value before-hand (to be the same for each pixel), and each pixel is coloured according to the escape-time of the recurrence starting with z 0 as the pixel s value. There are 3 There is a stunningly beautiful alternative rendering of the Mandelbrot set that is known as the Buddhabrot Google it. Rather than colour pixels according to the speed with which they diverge to infinity, pixels are coloured according to how many times they are landed upon by the various orbits of points around the Mandelbrot set before they leave. This provides an intricate glimpse of the dynamical behaviour of points near the set. Although I don t have time to develop it further here, I would say that the Buddhabrot is my single favourite fractal rendering technique. 7 ANU College of Engineering and Computer Science May 2015

8 infinitely many choices for c, and each will produce a different result. Some values of c producing boring, ugly, not-really-fractal images. Some values of c produce stunning pictures that render increasing complexity on zooming. The task of predicting a priori which you ll get is far, far beyond the scope of this course. (A phrase you re probably sick of hearing by now.) Your task is to modify my code and to explore the parameter space of c. I don t anticipate that you will need to modify my rendering code, i.e Diver.hs you should be able to create a new module Julia.hs that exports a function escape_time (with the same type signature as in my Mandelbrot module), and simply replace the relevant import statement in Diver.hs. If you come across any values of c that produce particularly attractive renderings, please feel free to me about them and discuss! Submit your code to the SubmissionApp under Lab 13 Julia Sets. Changes are that the results are so beautiful that I have to show them in class (if you agree to it of course). Make Sure You Logout to Terminate Your Session! 8 ANU College of Engineering and Computer Science May 2015

RECURSION. Week 6 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on material by James Barker. Pre-Laboratory Checklist

RECURSION. Week 6 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on material by James Barker. Pre-Laboratory Checklist RECURSION Week 6 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on material by James Barker Pre-Laboratory Checklist vvskills: You can write any conditional expression. vvknowledge:

More information

Discrete Dynamical Systems: A Pathway for Students to Become Enchanted with Mathematics

Discrete Dynamical Systems: A Pathway for Students to Become Enchanted with Mathematics Discrete Dynamical Systems: A Pathway for Students to Become Enchanted with Mathematics Robert L. Devaney, Professor Department of Mathematics Boston University Boston, MA 02215 USA bob@bu.edu Abstract.

More information

Fun with Fractals Saturday Morning Math Group

Fun with Fractals Saturday Morning Math Group Fun with Fractals Saturday Morning Math Group Alistair Windsor Fractals Fractals are amazingly complicated patterns often produced by very simple processes. We will look at two different types of fractals

More information

Symmetric Fractals. Seeking Sangaku Ramanujan, Hardy, and Ono

Symmetric Fractals. Seeking Sangaku Ramanujan, Hardy, and Ono Symmetric Fractals Seeking Sangaku Ramanujan, Hardy, and Ono Published by the Mathematical Association of America : : November 2016 Figure 1. Clockwise from far left, the Sierpinski triangle, the Koch

More information

n! = 1 * 2 * 3 * 4 * * (n-1) * n

n! = 1 * 2 * 3 * 4 * * (n-1) * n The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion Objectives By completing this lab exercise, you should learn to Recognize simple self-similar problems which are

More information

Fractals: Self-Similarity and Fractal Dimension Math 198, Spring 2013

Fractals: Self-Similarity and Fractal Dimension Math 198, Spring 2013 Fractals: Self-Similarity and Fractal Dimension Math 198, Spring 2013 Background Fractal geometry is one of the most important developments in mathematics in the second half of the 20th century. Fractals

More information

<The von Koch Snowflake Investigation> properties of fractals is self-similarity. It means that we can magnify them many times and after every

<The von Koch Snowflake Investigation> properties of fractals is self-similarity. It means that we can magnify them many times and after every Jiwon MYP 5 Math Ewa Puzanowska 18th of Oct 2012 About Fractal... In geometry, a fractal is a shape made up of parts that are the same shape as itself and are of

More information

An Introduction to Fractals

An Introduction to Fractals An Introduction to Fractals Sarah Hardy December 10, 2018 Abstract Fractals can be defined as an infinitely complex pattern that is self-similar, that is contains replicas of itself of varying sizes, across

More information

Koch Snowflake Go Figure The Koch Snowflake is a fractal based on a very simple rule.

Koch Snowflake Go Figure  The Koch Snowflake is a fractal based on a very simple rule. Koch Snowflake The Koch Snowflake is a fractal based on a very simple rule. The Rule: Whenever you see a straight line, like the one on the left, divide it in thirds and build an equilateral triangle (one

More information

On Fractal Colouring Algorithms

On Fractal Colouring Algorithms 5 10 July 2004, Antalya, Turkey Dynamical Systems and Applications, Proceedings, pp. 706 711 On Fractal Colouring Algorithms Nergiz Yaz Department of Mathematics, Faculty of Sciences Ankara University,

More information

Lecture 3: Some Strange Properties of Fractal Curves

Lecture 3: Some Strange Properties of Fractal Curves Lecture 3: Some Strange Properties of Fractal Curves I have been a stranger in a strange land. Exodus 2:22 1. Fractal Strangeness Fractals have a look and feel that is very different from ordinary curves.

More information

Exploring Fractals through Geometry and Algebra. Kelly Deckelman Ben Eggleston Laura Mckenzie Patricia Parker-Davis Deanna Voss

Exploring Fractals through Geometry and Algebra. Kelly Deckelman Ben Eggleston Laura Mckenzie Patricia Parker-Davis Deanna Voss Exploring Fractals through Geometry and Algebra Kelly Deckelman Ben Eggleston Laura Mckenzie Patricia Parker-Davis Deanna Voss Learning Objective and skills practiced Students will: Learn the three criteria

More information

TREES. Week 8 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on material by James Barker. Pre-Laboratory Checklist

TREES. Week 8 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on material by James Barker. Pre-Laboratory Checklist TREES Week 8 Laboratory for Introduction to Programming and Algorithms Uwe R. Zimmer based on material by James Barker Pre-Laboratory Checklist vvskills: You can understand and write conditional, recursive

More information

Fractals. Materials. Pencil Paper Grid made of triangles

Fractals. Materials. Pencil Paper Grid made of triangles Fractals Overview: Fractals are new on the mathematics scene, however they are in your life every day. Cell phones use fractal antennas, doctors study fractal-based blood flow diagrams to search for cancerous

More information

Koch-Like Fractal Images

Koch-Like Fractal Images Bridges Finland Conference Proceedings Koch-Like Fractal Images Vincent J. Matsko Department of Mathematics University of San Francisco vince.matsko@gmail.com Abstract The Koch snowflake is defined by

More information

Hopalong Fractals. Linear complex. Quadratic complex

Hopalong Fractals. Linear complex. Quadratic complex Hopalong Fractals Hopalong fractals are created by iterating a more or less simple formula in x and y over and over again. In general three types of behaviour can be distinguished. Often the series will

More information

MITOCW 2. IV: Consistency, Completeness, and Geometry

MITOCW 2. IV: Consistency, Completeness, and Geometry MITOCW 2. IV: Consistency, Completeness, and Geometry The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational

More information

Generation of 3D Fractal Images for Mandelbrot and Julia Sets

Generation of 3D Fractal Images for Mandelbrot and Julia Sets 178 Generation of 3D Fractal Images for Mandelbrot and Julia Sets Bulusu Rama #, Jibitesh Mishra * # Department of Computer Science and Engineering, MLR Institute of Technology Hyderabad, India 1 rama_bulusu@yahoo.com

More information

Grade 6 Math Circles. Shapeshifting

Grade 6 Math Circles. Shapeshifting Faculty of Mathematics Waterloo, Ontario N2L 3G1 Plotting Grade 6 Math Circles October 24/25, 2017 Shapeshifting Before we begin today, we are going to quickly go over how to plot points. Centre for Education

More information

Chapel Hill Math Circle: Symmetry and Fractals

Chapel Hill Math Circle: Symmetry and Fractals Chapel Hill Math Circle: Symmetry and Fractals 10/7/17 1 Introduction This worksheet will explore symmetry. To mathematicians, a symmetry of an object is, roughly speaking, a transformation that does not

More information

Introduction to Programming

Introduction to Programming CHAPTER 1 Introduction to Programming Begin at the beginning, and go on till you come to the end: then stop. This method of telling a story is as good today as it was when the King of Hearts prescribed

More information

ITERATIVE OPERATIONS IN CONSTRUCTION CIRCULAR AND SQUARE FRACTAL CARPETS

ITERATIVE OPERATIONS IN CONSTRUCTION CIRCULAR AND SQUARE FRACTAL CARPETS ITERATIVE OPERATIONS IN CONSTRUCTION CIRCULAR AND SQUARE FRACTAL CARPETS Dr. Yusra Faisal Al-Irhaim, Marah Mohamed Taha University of Mosul, Iraq ABSTRACT: Carpet designing is not only a fascinating activity

More information

Exploring the Effect of Direction on Vector-Based Fractals

Exploring the Effect of Direction on Vector-Based Fractals BRIDGES Mathematical Connections in Art, Music, and Science Exploring the Effect of Direction on Vector-Based Fractals Magdy Ibrahim and Robert J. Krawczyk College of Architecture Dlinois Institute of

More information

In this lesson, students build fractals and track the growth of fractal measurements using tables and equations. Enduring Understanding

In this lesson, students build fractals and track the growth of fractal measurements using tables and equations. Enduring Understanding LessonTitle: Fractal Functions Alg 5.8 Utah State Core Standard and Indicators Algebra Standards 2, 4 Process Standards 1-5 Summary In this lesson, students build fractals and track the growth of fractal

More information

Fun with Fractals and Functions. CHAMP at University of Houston March 2, 2015 Houston, Texas

Fun with Fractals and Functions. CHAMP at University of Houston March 2, 2015 Houston, Texas Fun with Fractals and Functions CHAMP at University of Houston March 2, 2015 Houston, Texas Alice Fisher afisher@rice.edu Director of Technology Applications & Integration at Rice University School Mathematics

More information

1

1 Zeros&asymptotes Example 1 In an early version of this activity I began with a sequence of simple examples (parabolas and cubics) working gradually up to the main idea. But now I think the best strategy

More information

A Discussion of Julia and Mandelbrot Sets. In this paper we will examine the definitions of a Julia Set and the Mandelbrot Set, its

A Discussion of Julia and Mandelbrot Sets. In this paper we will examine the definitions of a Julia Set and the Mandelbrot Set, its Annika Awbrey Emily Clerc 4/30/14 A Discussion of Julia and Mandelbrot Sets In this paper we will examine the definitions of a Julia Set and the Mandelbrot Set, its characteristics, and the images that

More information

Mathematics 350 Section 6.3 Introduction to Fractals

Mathematics 350 Section 6.3 Introduction to Fractals Mathematics 350 Section 6.3 Introduction to Fractals A fractal is generally "a rough or fragmented geometric shape that is self-similar, which means it can be split into parts, each of which is (at least

More information

CS 543: Computer Graphics Lecture 3 (Part I): Fractals. Emmanuel Agu

CS 543: Computer Graphics Lecture 3 (Part I): Fractals. Emmanuel Agu CS 543: Computer Graphics Lecture 3 (Part I: Fractals Emmanuel Agu What are Fractals? Mathematical expressions Approach infinity in organized way Utilizes recursion on computers Popularized by Benoit Mandelbrot

More information

CS 106 Winter 2016 Craig S. Kaplan. Module 07 Recursion and fractals Topics. Recursion as an extension of hierarchical modelling Simple fractals

CS 106 Winter 2016 Craig S. Kaplan. Module 07 Recursion and fractals Topics. Recursion as an extension of hierarchical modelling Simple fractals CS 106 Winter 2016 Craig S. Kaplan Module 07 Recursion and fractals Topics Recursion as an extension of hierarchical modelling Simple fractals Readings Learning Processing, Section 13.11 Nature of Code,

More information

Graphics in IT82. Representing Graphical Data. Graphics in IT82. Lectures Overview. Representing Graphical Data. Logical / Physical Representation

Graphics in IT82. Representing Graphical Data. Graphics in IT82. Lectures Overview. Representing Graphical Data. Logical / Physical Representation Graphics in IT82 What does computer graphics cover? Representing Graphical Data Chapman & Chapman, chapters 3,4,5 Richardson IT82 Input, output, and representation of graphical data Creation of graphics

More information

Examples of Chaotic Attractors and Their Fractal Dimension

Examples of Chaotic Attractors and Their Fractal Dimension Examples of Chaotic Attractors and Their Fractal Dimension Ulrich A. Hoensch Rocky Mountain College Billings, MT 59102 www.rocky.edu/ hoenschu February 2005 Abstract We present the Sierpinski Triangle

More information

CS 463 Project 1 Imperative/OOP Fractals

CS 463 Project 1 Imperative/OOP Fractals CS 463 Project 1 Imperative/OOP Fractals The goal of a couple of our projects is to compare a simple project across different programming paradigms. This semester, we will calculate the Mandelbrot Set

More information

Prezi Quick Guide: Make a Prezi in minutes

Prezi Quick Guide: Make a Prezi in minutes Prezi Quick Guide: Make a Prezi in minutes by Billy Meinke Updated Feb 2016 by Gina Iijima Welcome! This short guide will have you making functional and effective Prezis in no time. Prezi is a dynamic

More information

Session 27: Fractals - Handout

Session 27: Fractals - Handout Session 27: Fractals - Handout Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth, nor does lightning travel in a straight line. Benoit Mandelbrot (1924-2010)

More information

XaoS Notes. That means that I can give you a copy as long as I tell you the following:

XaoS Notes. That means that I can give you a copy as long as I tell you the following: Contents: Autopilot... 4 Basic controls... 3 Filters... 5 Installing XaoS... 1 Iterations... 4 Load random example... 4 Tutorials... 5 Theory: XaoS is a free program that generates fractals. Fractals are

More information

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 43 Dynamic Binding (Polymorphism): Part III Welcome to Module

More information

Gentle Introduction to Fractals

Gentle Introduction to Fractals Gentle Introduction to Fractals www.nclab.com Contents 1 Fractals Basics 1 1.1 Concept................................................ 1 1.2 History................................................ 2 1.3

More information

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 28 November 8, 2012

CS 4300 Computer Graphics. Prof. Harriet Fell Fall 2012 Lecture 28 November 8, 2012 CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 28 November 8, 2012 1 Today s Topics Fractals Mandelbrot Set Julia Sets L-Systems 2 Fractals The term fractal was coined in 1975 by Benoît

More information

Computer Graphics 4731 Lecture 5: Fractals. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics 4731 Lecture 5: Fractals. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics 4731 Lecture 5: Fractals Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI What are Fractals? Mathematical expressions to generate pretty pictures Evaluate

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

Projective geometry and the extended Euclidean plane

Projective geometry and the extended Euclidean plane Chapter 2 Projective geometry and the extended Euclidean plane Math 4520, Fall 2017 As we can see from Hilbert s treatment, a completely worked out axiom system for geometry in the plane is quite complicated.

More information

Representing Graphical Data

Representing Graphical Data Representing Graphical Data Chapman & Chapman, chapters 3,4,5 Richardson 1 Graphics in IT82 What does computer graphics cover? IT82 Input, output, and representation of graphical data Creation of graphics

More information

Computer Graphics (CS 543) Lecture 2c: Fractals. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics (CS 543) Lecture 2c: Fractals. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics (CS 543 Lecture c: Fractals Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI What are Fractals? Mathematical expressions to generate pretty pictures Evaluate

More information

Learning Plane Geometry Alvaro Briz Redon, Angel Serrano Aroca

Learning Plane Geometry Alvaro Briz Redon, Angel Serrano Aroca Learning Plane Geometry Alvaro Briz Redon, Angel Serrano Aroca 2018-01-05 Introduction Several authors defend that learning to program provides powerful strategies for thinking, designing and solving problems.

More information

p x i 1 i n x, y, z = 2 x 3 y 5 z

p x i 1 i n x, y, z = 2 x 3 y 5 z 3 Pairing and encoding functions Our aim in this part of the course is to show that register machines can compute everything that can be computed, and to show that there are things that can t be computed.

More information

Filling Space with Random Line Segments

Filling Space with Random Line Segments Filling Space with Random Line Segments John Shier Abstract. The use of a nonintersecting random search algorithm with objects having zero width ("measure zero") is explored. The line length in the units

More information

CS179: GPU Programming Recitation 5: Rendering Fractals

CS179: GPU Programming Recitation 5: Rendering Fractals CS179: GPU Programming Recitation 5: Rendering Fractals Rendering Fractals Volume data vs. texture memory Creating and using CUDA arrays Using PBOs for screen output Quaternion Julia Sets Rendering volume

More information

Grade 6 Math Circles November 6 & Relations, Functions, and Morphisms

Grade 6 Math Circles November 6 & Relations, Functions, and Morphisms Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Relations Let s talk about relations! Grade 6 Math Circles November 6 & 7 2018 Relations, Functions, and

More information

Visualization Insider A Little Background Information

Visualization Insider A Little Background Information Visualization Insider A Little Background Information Visualization Insider 2 Creating Backgrounds for 3D Scenes Backgrounds are a critical part of just about every type of 3D scene. Although they are

More information

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16 600.463 Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Dynamic Programming I Date: 10/6/16 11.1 Introduction Dynamic programming can be very confusing until you ve used it a

More information

3D Hyperbolic Tiling and Horosphere Cross Section

3D Hyperbolic Tiling and Horosphere Cross Section 3D Hyperbolic Tiling and Horosphere Cross Section Vladimir Bulatov, Shapeways Joint AMS/MAA meeting San Diego, January 10, 2018 Inversive Geometry Convenient container to work with 3 dimensional hyperbolic

More information

the NXT-G programming environment

the NXT-G programming environment 2 the NXT-G programming environment This chapter takes a close look at the NXT-G programming environment and presents a few simple programs. The NXT-G programming environment is fairly complex, with lots

More information

The (Math) Problem With Pentagons

The (Math) Problem With Pentagons The (Math) Problem With Pentagons Triangles fit effortlessly together, as do squares. When it comes to pentagons, what gives? By Patrick Honner BIG MOUTH for Quanta Magazine Children s blocks lie scattered

More information

Scientific Calculation and Visualization

Scientific Calculation and Visualization Scientific Calculation and Visualization Topic Iteration Method for Fractal 2 Classical Electrodynamics Contents A First Look at Quantum Physics. Fractals.2 History of Fractal.3 Iteration Method for Fractal.4

More information

Fixed Point Iterative Techniques An Application to Fractals

Fixed Point Iterative Techniques An Application to Fractals Fixed Point Iterative Techniques An Application to Fractals Narayan Partap 1 and Prof. Renu Chugh 2 1 Amity Institute of Applied Sciences, Amity University, Noida, India 2 Department of Mathematics, M.D.

More information

2,500 YEARS TOO LATE CLEANING UP THE MESS OF ZENO

2,500 YEARS TOO LATE CLEANING UP THE MESS OF ZENO 2,500 YEARS TOO LATE CLEANING UP THE MESS OF ZENO Good morning. I ve very happy to be here today to talk about a topic dear to my heart fractals. But rather than start with fractals, I want to tell you

More information

Let s Make a Front Panel using FrontCAD

Let s Make a Front Panel using FrontCAD Let s Make a Front Panel using FrontCAD By Jim Patchell FrontCad is meant to be a simple, easy to use CAD program for creating front panel designs and artwork. It is a free, open source program, with the

More information

COMP 161 Lecture Notes 16 Analyzing Search and Sort

COMP 161 Lecture Notes 16 Analyzing Search and Sort COMP 161 Lecture Notes 16 Analyzing Search and Sort In these notes we analyze search and sort. Counting Operations When we analyze the complexity of procedures we re determine the order of the number of

More information

Lecture 1: Overview

Lecture 1: Overview 15-150 Lecture 1: Overview Lecture by Stefan Muller May 21, 2018 Welcome to 15-150! Today s lecture was an overview that showed the highlights of everything you re learning this semester, which also meant

More information

Some geometries to describe nature

Some geometries to describe nature Some geometries to describe nature Christiane Rousseau Since ancient times, the development of mathematics has been inspired, at least in part, by the need to provide models in other sciences, and that

More information

Scope and Sequence for the New Jersey Core Curriculum Content Standards

Scope and Sequence for the New Jersey Core Curriculum Content Standards Scope and Sequence for the New Jersey Core Curriculum Content Standards The following chart provides an overview of where within Prentice Hall Course 3 Mathematics each of the Cumulative Progress Indicators

More information

Escape-Time Fractals

Escape-Time Fractals Escape-Time Fractals Main Concept Fractals are geometric shapes that exhibit self-similarity. That is, they have the same pattern at different scales. In fact, fractals continue to show intricate details

More information

CS 106 Winter 2016 Craig S. Kaplan. Module 08 Randomness and noise Topics

CS 106 Winter 2016 Craig S. Kaplan. Module 08 Randomness and noise Topics CS 106 Winter 2016 Craig S. Kaplan Module 08 Randomness and noise Topics The use of randomness as a design tool, controlling randomness in code Emergent design from simple rules Readings Learning Processing,

More information

Fractals. Investigating task farms and load imbalance

Fractals. Investigating task farms and load imbalance Fractals Investigating task farms and load imbalance Reusing this material This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. http://creativecommons.org/licenses/by-nc-sa/4.0/deed.en_us

More information

Fractals and the Chaos Game

Fractals and the Chaos Game Math: Outside the box! Fractals and the Chaos Game Monday February 23, 2009 3:30-4:20 IRMACS theatre, ASB 10900 Randall Pyke Senior Lecturer Department of Mathematics, SFU A Game. Is this a random walk?

More information

Total Choas... Total Chosa

Total Choas... Total Chosa Total Choas... Total Chosa An Honors Thesis (Honors 499) By Christopher J. Butler - Ball State University Muncie, Indiana April 22, 2002 December 2002 ,- Acknowledgments Many thanks go to the mathematics

More information

Lecture 6: Fractals from Iterated Function Systems. He draweth also the mighty with his power: Job 24:22

Lecture 6: Fractals from Iterated Function Systems. He draweth also the mighty with his power: Job 24:22 Lecture 6: Fractals from Iterated Function Systems He draweth also the mighty with his power: Job 24:22 1. Fractals by Iteration The Sierpinski gasket and the Koch snowflake can both be generated in LOGO

More information

Order from Chaos. Nebraska Wesleyan University Mathematics Circle

Order from Chaos. Nebraska Wesleyan University Mathematics Circle Order from Chaos Nebraska Wesleyan University Mathematics Circle Austin Mohr Department of Mathematics Nebraska Wesleyan University February 2, 20 The (, )-Puzzle Start by drawing six dots at the corners

More information

The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion - Python version

The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion - Python version The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion - Python version Objectives By completing this lab exercise, you should learn to Recognize simple self-similar problems

More information

Self-Similar Snowflakes with Optional Fractal Extension

Self-Similar Snowflakes with Optional Fractal Extension Self-Similar Snowflakes with Optional Fractal Extension Elizabeth Untiedt Mathematics OBJECTIVE, BACKGROUND INFORMATION, & REFERENCES Standards Met: Algebra: Represent, describe, and analyze patterns and

More information

Math Dr. Miller - Constructing in Sketchpad (tm) - Due via by Friday, Mar. 18, 2016

Math Dr. Miller - Constructing in Sketchpad (tm) - Due via  by Friday, Mar. 18, 2016 Math 304 - Dr. Miller - Constructing in Sketchpad (tm) - Due via email by Friday, Mar. 18, 2016 As with our second GSP activity for this course, you will email the assignment at the end of this tutorial

More information

Planar Graphs and Surfaces. Graphs 2 1/58

Planar Graphs and Surfaces. Graphs 2 1/58 Planar Graphs and Surfaces Graphs 2 1/58 Last time we discussed the Four Color Theorem, which says that any map can be colored with at most 4 colors and not have two regions that share a border having

More information

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer

Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer Midterm Exam Fundamentals of Computer Graphics (COMP 557) Thurs. Feb. 19, 2015 Professor Michael Langer The exam consists of 10 questions. There are 2 points per question for a total of 20 points. You

More information

DISTRIBUTION. Week 11 Laboratory for Systems, Networks and Concurrency Uwe R. Zimmer. Pre-Laboratory Checklist

DISTRIBUTION. Week 11 Laboratory for Systems, Networks and Concurrency Uwe R. Zimmer. Pre-Laboratory Checklist DISTRIBUTION Week 11 Laboratory for Systems, Networks and Concurrency Uwe R. Zimmer Pre-Laboratory Checklist vvyou have read this text before you come to your lab session. vvyou understand and can utilize

More information

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14 600.363 Introduction to Algorithms / 600.463 Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14 23.1 Introduction We spent last week proving that for certain problems,

More information

Geometry Scope & Sequence - Charles A. Dana Center, March 2006

Geometry Scope & Sequence - Charles A. Dana Center, March 2006 Geometric structure (3.5 weeks) Using inductive reasoning and conjectures Terms, notation, and representation 0.5 weeks G.2 (Geometric structure. The student analyzes geometric relationships in order to

More information

Applications. 44 Stretching and Shrinking

Applications. 44 Stretching and Shrinking Applications 1. Look for rep-tile patterns in the designs below. For each design, tell whether the small quadrilaterals are similar to the large quadrilateral. Explain. If the quadrilaterals are similar,

More information

On a coordinate plane, such a change can be described by counting the number of spaces, vertically and horizontally, that the figure has moved.

On a coordinate plane, such a change can be described by counting the number of spaces, vertically and horizontally, that the figure has moved. Transformations We have studied four different kinds of transformations: translation, rotation, reflection, and dilation. Each one involves moving a figure to a new location on a plane. Translation Translation

More information

textures not patterns

textures not patterns This tutorial will walk you through how to create a seamless texture in Photoshop. I created the tutorial using Photoshop CS2, but it should work almost exactly the same for most versions of Photoshop

More information

GTPS Curriculum Mathematics Grade 8

GTPS Curriculum Mathematics Grade 8 4.2.8.B2 Use iterative procedures to generate geometric patterns: Fractals (e.g., the Koch Snowflake); Self-similarity; Construction of initial stages; Patterns in successive stages (e.g., number of triangles

More information

EEN118 LAB FOUR. h = v t ½ g t 2

EEN118 LAB FOUR. h = v t ½ g t 2 EEN118 LAB FOUR In this lab you will be performing a simulation of a physical system, shooting a projectile from a cannon and working out where it will land. Although this is not a very complicated physical

More information

ME 442. Marc/Mentat-2011 Tutorial-1

ME 442. Marc/Mentat-2011 Tutorial-1 ME 442 Overview Marc/Mentat-2011 Tutorial-1 The purpose of this tutorial is to introduce the new user to the MSC/MARC/MENTAT finite element program. It should take about one hour to complete. The MARC/MENTAT

More information

Clouds, biological growth, and coastlines are

Clouds, biological growth, and coastlines are L A B 11 KOCH SNOWFLAKE Fractals Clouds, biological growth, and coastlines are examples of real-life phenomena that seem too complex to be described using typical mathematical functions or relationships.

More information

Game Mathematics. (12 Week Lesson Plan)

Game Mathematics. (12 Week Lesson Plan) Game Mathematics (12 Week Lesson Plan) Lesson 1: Set Theory Textbook: Chapter One (pgs. 1 15) We begin the course by introducing the student to a new vocabulary and set of rules that will be foundational

More information

Creating a Poster in Google SketchUp

Creating a Poster in Google SketchUp If you have digital image, or can find one online, you can easily make that image into a room poster. For this project, it helps to have some basic knowledge of Google SketchUp (though detailed instructions

More information

Fractal Geometry. Prof. Thomas Bäck Fractal Geometry 1. Natural Computing Group

Fractal Geometry. Prof. Thomas Bäck Fractal Geometry 1. Natural Computing Group Fractal Geometry Prof. Thomas Bäck Fractal Geometry 1 Contents Introduction The Fractal Geometry of Nature - Self-Similarity - Some Pioneering Fractals - Dimension and Fractal Dimension Scope of Fractal

More information

FRACTALS The term fractal was coined by mathematician Benoit Mandelbrot A fractal object, unlike a circle or any regular object, has complexity at all scales Natural Fractal Objects Natural fractals

More information

View Frustum Culling with Octree

View Frustum Culling with Octree View Frustum Culling with Octree Raka Mahesa 13508074 Program Studi Teknik Informatika Sekolah Teknik Elektro dan Informatika Institut Teknologi Bandung, Jl. Ganesha 10 Bandung 40132, Indonesia if18074@itb.ac.id

More information

Fractals: a way to represent natural objects

Fractals: a way to represent natural objects Fractals: a way to represent natural objects In spatial information systems there are two kinds of entity to model: natural earth features like terrain and coastlines; human-made objects like buildings

More information

Discovering. Algebra. An Investigative Approach. Condensed Lessons for Make-up Work

Discovering. Algebra. An Investigative Approach. Condensed Lessons for Make-up Work Discovering Algebra An Investigative Approach Condensed Lessons for Make-up Work CONDENSED L E S S O N 0. The Same yet Smaller Previous In this lesson you will apply a recursive rule to create a fractal

More information

Fractal Dimension of Julia Sets

Fractal Dimension of Julia Sets Fractal Dimension of Julia Sets Claude Heiland-Allen claude@mathr.co.uk March 6, 2015 Fractal Dimension of Julia Sets Fractal Dimension How Long is a Coast? Box-Counting Dimension Examples Fractal Dimension

More information

Textures and UV Mapping in Blender

Textures and UV Mapping in Blender Textures and UV Mapping in Blender Categories : Uncategorised Date : 21st November 2017 1 / 25 (See below for an introduction to UV maps and unwrapping) Jim s Notes regarding Blender objects, the UV Editor

More information

Fractal Coding. CS 6723 Image Processing Fall 2013

Fractal Coding. CS 6723 Image Processing Fall 2013 Fractal Coding CS 6723 Image Processing Fall 2013 Fractals and Image Processing The word Fractal less than 30 years by one of the history s most creative mathematician Benoit Mandelbrot Other contributors:

More information

Typing Control. Chapter Conditionals

Typing Control. Chapter Conditionals Chapter 26 Typing Control 26.1 Conditionals Let s expand our language with a conditional construct. We can use if0 like before, but for generality it s going to be more convenient to have a proper conditional

More information

PowerPoint Basics: Create a Photo Slide Show

PowerPoint Basics: Create a Photo Slide Show PowerPoint Basics: Create a Photo Slide Show P 570 / 1 Here s an Enjoyable Way to Learn How to Use Microsoft PowerPoint Microsoft PowerPoint is a program included with all versions of Microsoft Office.

More information

Mathematical Cut-and-Paste: An Introduction to the Topology of Surfaces

Mathematical Cut-and-Paste: An Introduction to the Topology of Surfaces Mathematical Cut-and-Paste: An Introduction to the Topology of Surfaces March 4, 2018 A mathematician named Klein Thought the Möbius band was divine. Said he, If you glue The edges of two, You ll get a

More information

Use the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated.

Use the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated. Math 5335 Fall 2015 Lab #0: Installing and using GeoGebra This semester you will have a number of lab assignments which require you to use GeoGebra, a dynamic geometry program. GeoGebra lets you explore

More information

Doyle Spiral Circle Packings Animated

Doyle Spiral Circle Packings Animated Doyle Spiral Circle Packings Animated Alan Sutcliffe 4 Binfield Road Wokingham RG40 1SL, UK E-mail: nsutcliffe@ntlworld.com Abstract Doyle spiral circle packings are described. Two such packings illustrate

More information

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan Robust Stencil Shadow Volumes CEDEC 2001 Tokyo, Japan Mark J. Kilgard Graphics Software Engineer NVIDIA Corporation 2 Games Begin to Embrace Robust Shadows 3 John Carmack s new Doom engine leads the way

More information