# Blue Wash

### From Math Images

Blue Wash
Field: Fractals
Image Created By: Paul Cockshott
Website: Fractal Art

Blue Wash

This image is a random fractal that is created by continually dividing a rectangle into two parts and adjusting the brightness of each resulting part.

# Basic Description

This image is considered a random fractal, because the behavior and coloring of this image is determined randomly. The basic rule governing a fractal of this kind:

1. Take a rectangle
2. Divide the rectangle into two sub-rectangles at a random location
3. Adjust the brightnesses of each sub-rectangles by a random factor
4. Repeat for all current sub-rectangles (now considered "rectangles") in the image

### Two Methods

Inclined Brightness Method

The artist actually experimented with at least two methods to create images similar to the random fractal above that differed on how the brightness was adjusted in each split rectangle.

• The first (Basic) method involves simply increasing the brightness of one sub-rectangle and decreasing the brightness of the other sub-rectangle of a split rectangle by a random variable. This method was used to create the fractal featured at the top of this page.

• The second (Inclined) method involves adjusting the brightness of the two sub-rectangles gradually to make an inclined plane in brightness within each sub-rectangle. The brightness of the line where the rectangle is split is determined randomly, and the two resulting sub-rectangles then each form an increasing or decreasing plane in brightness to meet the brightness of the dividing line. If you compare the featured image at the top of the page (created by the first method) to the image on the right (created by this second method), you can see that this method results in a more "painterly" effect.

An interesting observation about the creation of these fractals is that with each iteration, the change in brightness and spatial aspects (splitting the rectangles) of the fractals become smaller and smaller and their influence on the images gradually diminishes. Thus, after a number of iterations, the fractals barely change in appearance. Please take a look at the applets below to test this observation.

[Click to show applet]

[Click to hide applet]

If you can see this message, you do not have the Java software required to view the applet.

### Origins of this Fractal

The artist who created this fractal, Paul Cockshott, is a computer scientist and a reader at the University of Glasgow. The various math images featured on this page emerged from his scientific research in stereo range finding, which is a method used to estimate distance and depth from two images (one from the right perspective and one from the left). Cockshott initially used Gaussian patterns for this project, but found that fractal patterns worked better...and were also more beautiful. Click here to learn more.

# A More Mathematical Explanation

Note: understanding of this explanation requires: *Statistics, Calculus

## Basic Recursive Method

The featured image at the top of this page was created using the basic recursive method that will be described in this section. The canvas begins with rectangles of various sizes and colors, each of which undergo this basic recursive method.

• Each rectangle is split into sub-rectangles ($a\,$ and $b\,$) by a random horizontal or vertical line ($\overline{PQ}\,$).

• The random offset value used to decrease or increase the brightness level of each rectangle is determined randomly, but the mean of the probability density function of the random offset value is proportional to the square root of the area of each sub-rectangle. Algebraically,

If a sub-rectangle has sides length $l\,$ and width $w\,$,
And the mean of the probability density function $f(x)\,$ of the random offset value (X) is $E(X) = \int_{-\infty}^{\infty} x f(x) dx$,
Then $\int_{-\infty}^{\infty} x f(x) dx \propto \sqrt{l * w}$

• The random offset value is then added to the brightness level of sub-rectangle $a\,$ and subtracted from the brightness level of sub-rectangle $b\,$ brightness to produce the next progression of the recursion method. The random value is designated such that, on average, the smaller sub-rectangle will have a smaller brightness offset than larger sub-rectangle. This method is repeated continuously to create a random fractal.

## Inclined Recursive Method - a more painterly effect

Random Fractal created using the basic method  Random Fractal with higher 'k  Random Fractal with lower 'k'

In this method, each rectangle is again split into two sub-rectangles by random dividing line $\overline{PQ}\,$. However, instead of using a random offset value to directly increase or decrease the brightness of the two sub-rectangles, there is an inclined change in brightness. The random variable used in this procedure has a probability density function with:

• a mean of $E(x)= 0\,$
• a standard deviation of $\sigma\approx k|\overline{PQ}|\,$, where k is a constant.

The brightness of the dividing line itself is increased or decreased by the random variable, and the sub-rectangles $a\,$ and $b\,$ then form inclined plans in brightness that gradually increase or decrease to match the brightness of the dividing line. Similar to the basic method, the random variable is picked such that, on average, the smaller rectangles will have a smaller brightness offset than rectangles.

Since k reflects the degree of randomness of the brightness of the color in each sub-rectangle, a higher k produces a more random fractal. The image on the above has a higher k constant than the image on the below.

# Teaching Materials

There are currently no teaching materials for this page. Add teaching materials.

# References

Paul Cockshott, Paul Cockshott

# Future Directions for this Page

• An applet letting users pick a few starting colors to start the random fractal and watch it produce an image, or even let them change k.

Leave a message on the discussion page by clicking the 'discussion' tab at the top of this image page.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 15, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8996798992156982, "perplexity_flag": "middle"}