An arbitrary sided shape, a polygon is defined by positional values of it's vertices. Being numeric in nature it is easy to create some sort of rule which produces a list of vertex positions when iterated upon. As can be seen in the header banner above it's simple to randomly assign vertex number, position, even colour (24-bit red, green, blue colour space is ideal for this). One of the most powerful ways of procedurally generating shapes is to create rules which can be applied an arbitrary number of times.

**Rule based generations**

## Rule Based Shape Generation

type:corners:

depth:

This creates some lovely patterns with edges detailed down to the pixel level. Depending on which rule is used snowflakes can be made or the edge tends towards a square, circle, diamond etc. Such shapes with 'infinitely detailed edges are known as fractals and have fascinating mathematical properties <links!> Mention fractional dimension, infinite edge length, zero volume and so on

<piccies>

**Fractals: Infinitely Detailed**

## Mandelbrot Render

<show equation>

Like all fractals it is infinitely detailed and the same overall pattern is repeated at different levels of zoom.

The only limit to the render to the right is the floating point accuracy of the web apps calculation (estimate?)

**L-System: Forestry**

## L-Tree System

L-Trees systems <link> are an abstract grammar where a sequence of symbols can be replaced by others. By using such symbols to represent branches and leaves they can be used to create their namesake. Wonderfully simple algorithm which draws line segments iterativly (mention turtle drawing tools). Like a fractal render a depth value can be set with the limit replaced with secondary structures (leaves and flowers?) Option of pure, symmetric structures or introducing a little bit of randomness.

## No comments:

## Post a Comment