Unformatted text preview:

Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)FractalsConsider a complex numberz = a + bi as a point (a, b) or vector in the Real Euclideanplane [1, i] with modulus |z| the length of the vector and equal to√a2+ b2.Complex arithmetic rules:(a + bi) + (c + di) = (a + c) + (b + d)i(a + bi)(c + di) = (ac − bd) + (ad + bc)iz → z2All numbers with modulus 1 will stay at modulus 1 and is the attractor set or fixed-point ofthis iterated function system.The University of Texas at Austin 1Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Julia Set for the point c: The attractor set of the iterated function system z → z2+ cwith c a complex constantJulia Set for c = −0.62 − 0.44iThe University of Texas at Austin 2Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Mandelbrot Set: Color the point c black if Julia (c) is connected, and white otherwise.The University of Texas at Austin 3Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Fractal Dimension:N(A, ǫ) = smallest number of ǫ-balls needed to cover A.Object A has dimension d if N(A, ǫ) grows as C(1/ǫ)dfor constant CFractal dimension d = limǫ→0ln N(A, ǫ)ln(1/ǫ)A fractal is an object which is self-similar at different scales and has a non-integer fractaldimensiond = limǫ→0ln N(A, ǫ)ln(1/ǫ)= limk→∞ln N(A, (1/2k))ln(1/(1/2k))= limk→∞ln 3kln 2k= limk→∞k ln 3k ln 2= limk→∞ln 3ln 2=ln 3ln 2≈ 1.58496.The University of Texas at Austin 4Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)The Sierpinski triangle covered by 3k(1/2k)-ballsRepeated Subdivision rule:Replace each piece of lengthx by b nonoverlapping piece of length x/a.The University of Texas at Austin 5Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Fractal dimension isd =ln bln aFor object below the area doesn’t change but boundary length does. The fractal dimensionisln 4ln(2√2)= 1.3333.An object with a fractal boundary via repeated subdivision.The University of Texas at Austin 6Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)L-Systems (Lindenmayer-Systems)• Aristid Lindenmayer, a botanist, initially developed this as a mathematical theory formodeling plants• Przemyslaw Prusinkiewicz (Dr. P.) fleshed this out for Graphics Modeling applications• Central concept is of string rewriting, using productions or rewriting rules (e.g. F → F+ F - - F + F with all symbols +, - as characters not operators)• Longer strings can be generated by repeated applications of the productions, startingfrom an axiom (e.g. F→ F + F - - F + F → F + F - - F + F + F + F - - F + F - - F+ F - - F + F + F + F - - F + F)• See (http://mathforum.org/advanced/robertd/lsys2d.html) for other examples.The University of Texas at Austin 7Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)String Re-Writing and Turtle Graphics• Turtle is a hypothetical drawing cursor on the screen or object coordinate system. Initiallyassume Turtle at origin (0,0) and facing UP.• Interpret F as “Move turtle forward one unit and draw a line segment”• Interpret - by “Turn counter-clockwise (ccw) byπ3”• Interpret + “Turn clockwise (cw) byπ3”• So then the string - F - - F - - F intepreted in Turtle graphics shall draw a triangle.• Applying the production (or rule) F → F + F - - F + F once to the axiom (- F - - F - -F) yields a Star.• Iterated applications of this rule, yields the Koch snowflake fractal.The University of Texas at Austin 8Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Constructing Trees2. L1 −> F [ − F L1 ] F [ + F T ] F L11. L0 −> F [ − F L1 ] F [ + F L2 ] F L03. L2 −> F [ − F T ] F [ + F L2 ] F L2F − Move ForwardL0, L1, L2 − Draw LeafT − Draw Terminating Leaf"+" − Turn Right"−" − Turn Left"[" − Push"]" − Pop(left half of tree)(right half of tree)(center branch)Depth 1 Depth 2 Depth 3Axiom: L0• The Turtle can make wiggly paths, but not branching.• For branching we use a Stack, and the L-system symbols [ for Push, and ] as Pop• A stack can be implemented using OpenGl operators PushMatrix() and PopMatrix () orthe Program Stack implicit in Recursion).The University of Texas at Austin 9Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Transformation Modelling• Model Turtle (position, direction, size) by a Matrix C• We use OpenGL by loading C into MODELVIEW matrix.• Assume Turtle initially at origin (0,0) and facing UP. This initial position is captured inC by the identity matrix• Now we wish to find the transformation that moves Turtle to (50,100) and facing anangle2π3•This is obtained by the sequence of Modelling transformations T(50,100) R(π6) appliedto C. Remember, the transformations need to be applied in the correct right2left order.The University of Texas at Austin 10Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Using Recursion• Use Recursion to replace PushMatrix (), PopMatrix() pairs with save and restore of thecurrent matrix in the resolution of recursive calls by the Program Stack.PushMatrix()TurnRight() DrawLeaf(i-1)PopMatrix()• DrawRightLeaf(i) Double[9]SavedMatrix;Copy(C,SavedMatrix); TurnRight() DrawLeaf(i-1) copy(SavedMatrix,C)PopMatrix()The University of Texas at Austin 11Department of Computer Sciences Graphics – Fall 2005 (Lecture 8)Reading Assignment and NewsChapter 2 Exercises and Chapter 10 pages 497 - 520, of Recommended Text.Please also track the News section of the Course Web Pages for the most recentAnnouncements related to this course.(http://www.cs.utexas.edu/users/bajaj/graphics25/cs354/)The University of Texas at Austin


View Full Document

UT CS 354 - Fractals

Download Fractals
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Fractals and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Fractals 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?