Orbit trap

Orbit trap

An orbit trap is a method of colouring fractal images based upon how close an iterative function, used to create the fractal, approaches a geometric shape, called a "trap". Typical traps are points, lines, circles, flower shapes and even raster images. Orbit traps are typically used to colour two dimensional fractals representing the complex plane.

Contents

Examples

Mandelbrot set rendered using a combination of cross and point shaped orbit traps.

Point based

A point based orbit trap colours a point based upon how close a function's orbit comes to a single point, typically the origin.

Line based

A line based orbit trap colours a point based upon how close a function's orbit comes to one or more lines, typically vertical or horizontal (x=a or y=a lines). Pickover stalks are an example of a line based orbit trap which use two lines.

Algorithm

Orbit traps are typically used with the class of two-dimensional fractals based on an iterative function. A program that creates such a fractal colours each pixel, which represent discrete points in the complex plane, based upon the behaviour of those points when they pass through a function a set number of times.

The best known example of this kind of fractal is the Mandelbrot set, which is based upon the function zn+1 = zn2 + c. The most common way of colouring Mandelbrot images is by taking the number of iterations required to reach a certain bailout value and then assigning that value a colour. This is called the escape time algorithm.

A program that colours the Mandelbrot set using a point-based orbit trap will assign each pixel with a “distance” variable, that will typically be very high when first assigned:

double distance = 10e5

As the program passes the complex value through the iterative function it will check the distance between each point in the orbit and the trap point. The value of the distance variable will be the shortest distance found during the iteration:

private double getDistance(Complex c,
                           Complex point,
                           int maxIteration)
{        
    double distance = 1e20;
    Complex z = new Complex(0, 0);
 
    for(int i=0; i<maxIteration; i++)
    {
        //Perfom Mandelbrot iteration
        z = z.multiply(z);
        z = z.add(c);
 
        //Set new distance dist = min( dist, |z-point| )
        Complex zMinusPoint = new Complex(z);
        zMinusPoint = zMinusPoint.subtract(point);
 
        double zMinusPointModulus = zMinusPoint.magnitude();
        if(zMinusPointModulus < distance)
            distance = zMinusPointModulus;
    }
 
    return distance;
}

Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Orbit (anthology series) — Orbit was a long running series of anthologies of new fiction edited by Damon Knight, often featuring work by such writers as Gene Wolfe, Joanna Russ, R. A. Lafferty, and Kate Wilhelm, who was married to Knight. The anthologies tended toward the… …   Wikipedia

  • Electron beam ion trap — (or its acronym EBIT) is used in physics to denote an electromagnetic bottle that produces and confines highly charged ions. It was invented by R. Marrs [Levine et al, 1988] and M. Levine at LLNL.An EBIT uses an electron beam focused by means of… …   Wikipedia

  • Mandelbrot set — Initial image of a Mandelbrot set zoom sequence with a continuously coloured environment …   Wikipedia

  • Mathematics and Physical Sciences — ▪ 2003 Introduction Mathematics       Mathematics in 2002 was marked by two discoveries in number theory. The first may have practical implications; the second satisfied a 150 year old curiosity.       Computer scientist Manindra Agrawal of the… …   Universalium

  • Physical Sciences — ▪ 2009 Introduction Scientists discovered a new family of superconducting materials and obtained unique images of individual hydrogen atoms and of a multiple exoplanet system. Europe completed the Large Hadron Collider, and China and India took… …   Universalium

  • List of The King of Braves GaoGaiGar antagonists — This is an index of antagonist characters and mecha in the anime and manga The King of Braves GaoGaiGar and The King of Braves GaoGaiGar FINAL .Zonder RobosWhen a living humanoid being (human or alien) is infected with Zonder Metal, it becomes a… …   Wikipedia

  • Mass spectrometry — (MS) is an analytical technique that measures the mass to charge ratio of charged particles.[1] It is used for determining masses of particles, for determining the elemental composition of a sample or molecule, and for elucidating the chemical… …   Wikipedia

  • Venus — /vee neuhs/, n., pl. Venuses for 2. 1. an ancient Italian goddess of gardens and spring, identified by the Romans with Aphrodite as the goddess of love and beauty. 2. an exceptionally beautiful woman. 3. (sometimes l.c.) Archaeol. a statuette of… …   Universalium

  • Ariane 5 — Launching/Ariane|type=rocket Infobox rocket caption = Ariane 5 mock up name = Ariane 5 function = Heavy launch vehicle manufacturer = EADS Astrium for ESA and Arianespace country origin = Europe height = 59 m alt height = 193 ft diameter = 5.4 m… …   Wikipedia

  • List of Ace double novels — Ace Books began publishing genre fiction starting in 1952. Initially these were mostly in the attractive dos à dosfact|date=July 2008 | dos à dos or tête bêche? format, but they also published a few single volumes, in the early years, and that… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”