Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Fractals and Mandelbrot sets, Essays (university) of Computer Science

Deatiled notes on fractals and its types.......

Typology: Essays (university)

2016/2017

Uploaded on 10/07/2017

ravi-shankar
ravi-shankar 🇮🇳

4.6

(8)

4 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Fractal:
Def: A fractal is a geometric object with fractional dimension. A fractal is an
abstract object used to describe and simulate naturally occurring objects.
Articially created fractals commonly exhibit similar patterns at increasingly
small scales.
Fractals are of 2 types:
Additive fractals ex: cross fractal
Replacement Fractals ex: Sierpinski triangle
Self Similarity:
Fractals can also be classied according to their self similarity. These are of 3
types:
1) Exact self similarity
2) Quasi self similarity
3) Statistical self similarity
Exact self similarity: This is the strongest type of self-similarity; the fractal
appears identical at dierent scales. Fractals dened by iterated function
systems often display exact self-similarity. For example, the Sierpinski triangle
and Koch snowake exhibit exact self-similarity
Quasi self similarity: This is a looser form of self-similarity; the fractal appears
approximately (but not exactly) identical at dierent scales. Quasi-self-similar
fractals contain small copies of the entire fractal in distorted and degenerate
forms. Fractals dened by recurrence relations are usually quasi-self-similar.
The Mandelbrot set is quasi-self-similar, as the satellites are approximations of
the entire set, but not exact copies.
Statistical self-similarity:
This is the weakest type of self-similarity; the fractal has numerical or
statistical measures which are preserved across scales. Most reasonable
denitions of "fractal" trivially imply some form of statistical self-similarity.
(Fractal dimension itself is a numerical measure which is preserved across
scales.) Random fractals are examples of fractals which are statistically self-
similar. The coastline of Britain is another example; one cannot expect to nd
microscopic Britain’s (even distorted ones) by looking at a small section of
the coast with a magnifying glass.
pf3
pf4
pf5
pf8

Partial preview of the text

Download Fractals and Mandelbrot sets and more Essays (university) Computer Science in PDF only on Docsity!

Fractal:

Def: A fractal is a geometric object with fractional dimension. A fractal is an abstract object used to describe and simulate naturally occurring objects. Artificially created fractals commonly exhibit similar patterns at increasingly small scales.

Fractals are of 2 types:

  • Additive fractals ex: cross fractal
  • Replacement Fractals ex: Sierpinski triangle

Self Similarity:

Fractals can also be classified according to their self similarity. These are of 3 types:

  1. Exact self similarity

  2. Quasi self similarity

  3. Statistical self similarity

Exact self similarity: This is the strongest type of self-similarity; the fractal

appears identical at different scales. Fractals defined by iterated function systems often display exact self-similarity. For example, the Sierpinski triangle and Koch snowflake exhibit exact self-similarity

Quasi self similarity: This is a looser form of self-similarity; the fractal appears approximately (but not exactly) identical at different scales. Quasi-self-similar fractals contain small copies of the entire fractal in distorted and degenerate forms. Fractals defined by recurrence relations are usually quasi-self-similar. The Mandelbrot set is quasi-self-similar, as the satellites are approximations of the entire set, but not exact copies.

Statistical self-similarity:

This is the weakest type of self-similarity; the fractal has numerical or statistical measures which are preserved across scales. Most reasonable definitions of "fractal" trivially imply some form of statistical self-similarity. (Fractal dimension itself is a numerical measure which is preserved across scales.) Random fractals are examples of fractals which are statistically self- similar. The coastline of Britain is another example; one cannot expect to find microscopic Britain’s (even distorted ones) by looking at a small section of the coast with a magnifying glass.

Sample code for additive fractal:

Def fractal(x,y,size, depth)

{

Drawcross(x,y,size);

If (depth>1)

{

Fractal(y+size, y, size/2, depth-1);

Fractal(x-size, y, size/2, depth-1);

Fractal(x, y+size, size/2, depth-1);

Fractal(x, y-size, size/2, depth-1);

}

}

Sample code for replacement fractal: Def fractal(x, y, size, depth)

{

If (depth<=1)

{

Drawtriangle(x, y, size);

} else

Fractal(x, y, size/2, depth-1);

Fractal(x-size/2, y-size*√3, size/2, depth-1);

Fractal(x+size/2, y-size*√3, size/2, depth-1);

}

Each affine map reduces the size of its image at least slightly, the orbit converge to a unique image called the attractor of the IFS. We denote the attractor by the set A, some of its important properties are:

  1. The attractor set A is a fixed point of the mapping W(.), which we write as W(A)=A. That is putting A through the copier again produces exactly the same image A.

The iterates have already converged to the set A, so iterating once more makes no difference.

  1. Starting with any input image B and iterating the copying process enough times, we find that the orbit of images always converges to the same A.

If Ik = W (k)^ (B) is the kth^ iterate of image B, then as k goes to infinity Ik

becomes indistinguishable from the attractor A.

Drawbacks

  • Inefficient
  • Huge amount of memory is required.

THE MANDELBROT SET Graphics provides a powerful tool for studying a fascinating collection of sets that are the most complicated objects in mathematics. Julia and Mandelbrot sets arise from a branch of analysis known as iteration theory, which asks what happens when one iterates a function endlessly. Mandelbrot used computer graphics to perform experiments.

Mandelbrot Sets and Iterated Function Systems

A view of the Mandelbrot set is shown in the below figure. It is the black inner portion, which appears to consist of a cardoid along with a number of wartlike circles glued to it.

The IFS uses the simple function f(z) = z2 + c -------------------------------(1)

Where c is some constant.

The system produces each output by squaring its input and adding c. We assume that the process begins with the starting value s, so the system generates the sequence of values or orbit

d1= (s)2 + c

d2= ((s)2 + c)2 + c

d3= (((s)2 + c)2 + c)2 + c

d4= ((((s)2 + c)2 + c)2 + c)2 + c ------------------------------(2)

The orbit depends on two ingredients

the starting point s the given value of c

Given two values of s and c how do points d (^) k along the orbit behaves as k gets larger and larger. Specifically, does the orbit remain finite or explode. Orbits that remain finite lie in their corresponding Julia or Mandelbrot set, whereas those that explode lie outside the set. When s and c are chosen to be complex numbers , complex arithmetic is used each time the function is applied. The Mandelbrot and Julia sets live in the complex plane – plane of complex numbers.

The IFS works well with both complex and real numbers. Both s and c are complex numbers and at each iteration we square the previous result and add c. Squaring a complex number z = x + yi yields the new complex number:

( x + yi)2 = (x2 – y2) + (2xy)i ----------------------------------(3)

having real part equal to x2 – y2 and imaginary part equal to 2xy.

Defining the Mandelbrot Set The Mandelbrot set considers different values of c, always using the starting point s =0. For each value of c, the set reports on the nature of the orbit of 0, whose first few values are as follows: orbit of

0: 0, c, c2+c, (c2+c)2+c, ((c2+c)2+c)2 +c,……..

Definition: The Mandelbrot set M is the set of all complex numbers c that produce a finite orbit of 0. If c is chosen outside of M, the resulting orbit explodes. If c is chosen just beyond the border of M, the orbit usually thrashes around the plane and goes to infinity. If the value of c is chosen inside M, the orbit can do a variety of things. For some c‟s it goes immediately to a fixed point or spirals into such a point.

the inverse of the function f(.) = (.)2 + c. The inverse of f(.) is , so we have two preimages of z are given by ------------------(6) c z c z

Drawing the Julia set Jc

To draw Jc we need to find a point and place a dot at all of the

point‟s preimages. Therea re two problems with this method:

  1. finding a point in Jc
  2. keeping track of all the preimages

An approach known as the backward-iteration method

overcomes these obstacles and produces good result. The idea is simple: Choose

some point z in the complex plane. The point may or may not be in Jc. Now iterate

in backward direction: at each iteration choose one of the two square roots

randomly, to produce a new z value. The following pseudocode is illustrative:

do {

if ( coin flip is heads z= z c );

else z = z c ;

draw dot at z;

} while (not bored);

RANDOM FRACTALS Fractal is the term associated with randomly generated curves and surfaces that exhibit a degree of self-similarity. These curves are used to provide “naturalistic” shapes for representing objects such as coastlines, rugged mountains, grass and fire.

Fractalizing a Segment The simplest random fractal is formed by recursively roughening or fractalizing a line segment. At each step, each line segment is replaced with a “random elbow”.

Steps in the fractalization process:

Three stages are required in the fractalization of a segment. In the first stage, the midpoint of AB is perturbed to form point C. In the second stage , each of the two segment has its midpoints perturbed to form points D and E. In the third and final stage, the new points F…..I are added. To perform fractalization in a program Line L passes through the midpoint M of segment S and is perpendicular to it. Any point C along L has the parametric form:

C(t) = M + (B-A) t -----------------------------------(7) for some values of t, where the midpoint M= (A+B)/2.

The distance of C from M is |B-A||t|, which is proportional to both t and the length of S. So to produce a point C on the random elbow, we let t be computed randomly. If t is positive, the elbow lies to one side of AB; if t is negative it lies to the other side.

Def fractal(x,y,size, depth)

{

Drawcross(x,y,size);

If (depth>1)

{

Fractal(y+size, y, size/2, depth-1);

Fractal(x-size, y, size/2, depth-1);

Fractal(x, y+size, size/2, depth-1);

Fractal(x, y-size, size/2, depth-1);

}

}