Download presentation
Presentation is loading. Please wait.
Published byBeverly Snow Modified over 9 years ago
1
Ch 9 Infinity page 1CSC 367 Fractals (9.2) Self similar curves appear identical at every level of detail often created by recursively drawing lines
2
Ch 9 Infinity page 2CSC 367 Koch Curve infinitely long line within a region of finite area mathematicians love this stuff!
3
Ch 9 Infinity page 3CSC 367 Polygons regular polygon has equal interior angles how do you generate the points? x = radius * cos angle y = radius * sin angle cos 0 = 1 sin 0 = 0 DrawNgon(center, radius, numSides) slice = 2π / Numsides for I = 1 to numSides angle = (I-1) * slice x2 = radius * cos angle + center.x y2 = radius * sin angle + center.y drawline (x1,y1) to (x2,y2) x1 = x2; y1 = y2;
4
Ch 9 Infinity page 4CSC 367 Random Fractals (9.8) Given a line segment AB Generate a random point on the perpendicular bisector Distance from the segment is a gaussian value with a mean of zero The range is proportional to the segment length
5
Ch 9 Infinity page 5CSC 367 Recursively Defined Trees Recursive definition a tree is a branch with several trees attached to the end of the branch Parameters include number of branches, branch length, depth of recursion, fan angle, starting point These parameters can be random
6
Ch 9 Infinity page 6CSC 367 Iterated Function Systems (9.6) Complex Numbers z = x + iy real part and imaginary part iteratively reapply functions until the values converge F k+1 = F k 2 This function converges with values less than 1 Goes to infinity for numbers greater than 1 Stays at 1 for values that start at 1 Points are in the set if they do not approach infinity Stop iterating after max times if |v| has not exceeded 2
7
Ch 9 Infinity page 7CSC 367 Mandelbrot Set Interesting Facts has a fractal perimeter the set is connected not matter how distinct various islands appear Perhaps the most complicated object seen in mathematics Area centered around c = -0.5 + i0.0 is most interesting the set of all complex numbers that produce a finite orbit of oi there is only one Mandelbrot set Calculating the set A set of points in the complex plane F k+1 = F k 2 + C Where C is a complex number for the current pixel C = x + iy (for every pixel to be generated) F 0 = 0 + i0
8
Ch 9 Infinity page 8CSC 367 The algorithm for each pixel i, j x = mapped from i to window coordinate y = mapped from j to window coordinate steps = iterateToInfinity(x, y); if (steps == max) point is in the set color is black else point is not in the set different colors are possible draw pixel with defined color
9
Ch 9 Infinity page 9CSC 367 Julia Set (9.7) Quite similar to Mandelbrot F k+1 = F k 2 + C Where C is a fixed complex number F 0 = x + iy (for every pixel to be generated) The set of points generated by a given C is called the Julia Set Different values of C produce different pictures There are an infinite number of Julia sets
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.