21
Algorithmic Art Mathematical Expansions Geometric, Arithmetic Series, Fibonacci Numbers • Computability – Turing Fractals and Brownian Motion, CA Recursive computations, Wolfram Perlin Noise Controlling randomness Voronoi Diagram / Delaunay Triangulation Computational Geometry

Algorithmic Art Mathematical Expansions –Geometric, Arithmetic Series, Fibonacci Numbers Computability –Turing Fractals and Brownian Motion, CA –Recursive

Embed Size (px)

Citation preview

Algorithmic Art

• Mathematical Expansions– Geometric, Arithmetic Series, Fibonacci

Numbers

• Computability– Turing

• Fractals and Brownian Motion, CA– Recursive computations, Wolfram

• Perlin Noise– Controlling randomness

• Voronoi Diagram / Delaunay Triangulation– Computational Geometry

Arithmetic SeriesAn arithmetic progression or arithmetic sequence is a sequence of numbers such that the difference of any two successive members of the sequence is a constant.

The nth term of an arithmetic series is given by:

The summation formula is as follows and approaches infinity:

Geometric Series

When above is an infinite series, r pow(n+1) converges to zero if -1 < r < 1

A geometric series is a series with a constant ratio between successive terms

Geometric SeriesThe behavior of a geometric sequence depends on the value of the

common ratio r.

If the common ratio is:• Positive, the terms will all be the same sign as the initial term. • Negative, the terms will alternate between positive and negative. • Greater than 1, there will be exponential growth towards positive

infinity. • 1, the progression is a constant sequence. • Between -1 and 1 but not zero, there will be exponential decay

towards zero. • −1, the progression is an alternating sequence • Less than −1, there will be exponential growth towards infinity

(positive and negative).

Geometric SeriesKoch’s Snowflake

Area:

r= 4/9, a=1/3

Area of Koch triangle is equal to the 8/5 of the area of the base triangle

Fibonacci NumbersThe Fibonacci numbers form a sequence defined by the following recurrence relation:

Where phi is the golden ratio, 1.618033….

Fibonacci NumbersNature's numbering system:

• the leaf arrangement in plants,

• pattern of the florets of a flower,

• the bracts of a pinecone,

• the scales of a pineapple.

The Fibonacci numbers are therefore applicable to the growth of every living thing, including a single cell, a grain of wheat, a hive of bees, and even all of mankind.

ComputabilityWhat is the minimal set of rules that we can use to construct computations such that every possible computation can be realized by these set of rules?

A model for computation with general recursive functions:

• Zero: returns 0 for any argument

• Successor: adds 1 to its argument

• Projection: returns any of its arguments

• Composition: constructs a new function by compositing several functions from the base set

• Recursion

• Minimization

ComputabilityTuring Machine:

A model of computability proposed by Alan Turing

It is hypothetical device with read / write head and infinite long tape of discrete symbols that can be read or written.

He showed that many complex problems can be reduced to simpler problems that can be solved on a single tape Turing machine.

Incomputability:

Though not all problems are computable, meaning not all of them will return a result within a finite amount of time even though there are no other limitations.

FractalsThe term coined by Benoit Mandelbrot.

We’ve already seen Koch’s Snowflake…

• Self-similar geometries of multiple scales,

• All fractals have a built-in form of recursion,

• Are invariant under scale.

Brownian MotionA random walk consisting of self-similar patterns on varying temporal and spatial scales.

Is being utilized to model movement of liquids, white noise patterns and economic fluctuations.

3D Brownian Motion yields a very good approximation for geographic structures like mountains, streams and coastlines.

Fractal GrowthDiffusion limited aggregation:

Start with a fixed seed and all other objects moving with Brownian motion becomes fixed when they touch a stationery object.

3D Brownian Motion yields a very good approximation for geographic structures like mountains, streams and coastlines.

Fractal GrowthL-systems

Invented by Aristid Lindenmayer, biologist, as a formal mathematical description of plant growth.

They consist of a special seed and a description of how new cell types can be generated from old cell types. An axiom and production rules.

Strange AttractorsAn attractor is a set to which a dynamical system evolves after a long enough time. That is, points that get close enough to the attractor remain close even if slightly disturbed. Geometrically, an attractor can be a point, a curve, a manifold, or even a complicated set with a fractal structure known as a strange attractor. Describing the attractors of chaotic dynamical systems has been one of the achievements of chaos theory.

The Lorenz Strange attractor in the image is defined only by three simple differential equations.

Strange attractors are used to model producer-consumer interactions, ecosystems, etc.

Cellular AutomataJohn Conway’s Game of Life (1970)

A grid consisting of autonomous cells behaving with a set of simple rules,

at each time step the state of the cell is computed as a function of its neighbors.

• Any live cell with fewer than two live neighbors dies, as if by loneliness.

• Any live cell with more than three live neighbors dies, as if by overcrowding.

• Any live cell with two or three live neighbors lives, unchanged, to the next generation.

• Any dead cell with exactly three live neighbors comes to life.

Cellular AutomataFormally analyzed by Stephen Wolfram.

He established CA under four different classes.

• Those that evolve to homogenous structures,

• Periodic structures that cycle,

• A-periodic random-like patterns,

• Complex patterns that move through space in time.

A New Kind Of Science

Used to model natural phenomena like flocks, herds…

Perlin NoiseA procedural texture primitive with pseudo-random characteristics.

“controlled randomness”

Ken Perlin, NYU

The idea is to add up harmonically changing noise functions in order to achieve pseudo-randomness.

Making Noise

A Brief Tutorial

Voronoi DiagramGiven a set of point in 2D space, the Voronoi diagram of those points is the subdivision of the plane into n cells, one for each point, such that any point q lies in the cell of pi if and only if

dist(pi, q) < dist(pj, q) for each point pj

Properties:•The closest pair of points corresponds to two adjacent cells in the Voronoi diagram. •Two points are adjacent on the convex hull if and only if their Voronoi cells share an infinitely long side.

Voronoi DiagramHow to compute Voronoi diagram?

Algorithms

Most common: Beach Line Algorithm

Delaunay TriangulationIs the dual graph of Voronoi diagrams.

Black lines, show Voronoi cells.

Red lines show Delaunay triangles, constructed by connecting points sharing an edge

Delaunay TriangulationIs the dual graph of Voronoi diagrams.Let n be the number of points and d the number of dimensions.

* The union of all simplices in the triangulation is the convex hull of the points. * The Delaunay triangulation contains at most O(n^(d/2)) simplices. * The Delaunay triangulation maximizes the minimum angle. Compared to any other triangulation of the points, the smallest angle in the Delaunay triangulation is at least as large as the smallest angle in any other. * A circle circumscribing any Delaunay triangle does not contain any other input points in its interior. * If a circle passing through two of the input points doesn't contain any other of them in its interior, then the segment connecting the two points is an edge of a Delaunay triangulation of the given points.