The Latööcarfian dream generator



 

parameters:  save | load    

|
|

a: 

b: 

c: 

d: 

quick draw
 
size:    oversample:   
density: 

draw | add points | abort


palette:  (color, percentile)

#ff0000

redraw palette


stretch:  0.00

background: 

recolor the image


The equations


The Latööcarfian fractals are the dreams of an ancient race of mathematicians living on Jupiter’s moon Ganymede.  Or so says Clifford A. Pickover in Chaos in Wonderland.

The image points are iterations of the following:
x1 = sin(y0 * b) + c * sin(x0 * b)
y1 = sin(x0 * a) + d * sin(y0 * a)

It is recommended that parameters be chosen from the ranges -3 < a, b < 3 and 0.5 < c, d < 1.5.  But we can't always predict our dreams . . . .

Mutation alpha:
x1 = sin(y0 * b) + sin(x0 * b)^2 + sin(x0 * b)^3
x1 = sin(x0 * a) + sin(y0 * a)^2 + sin(y0 * c)^3

Mutation beta:
x1 = sin(y0 * b) + sin(x0 * b)^2
x1 = sin(x0 * a) + sin(y0 * a)^2

Mutation gamma:
x1 = |sin(y0 * b)| + sin(x0 * b)^2
x1 = |sin(x0 * a)| + sin(y0 * a)^2

The general approach is to find parameters for the equations that produce an interesting low-resolution image, then draw it at higher resolution and color it.


First:  load an equation and some parameters.  A number of presets are included.  Then start incrementing the parameters.  The spin buttons next to the parameter felds increment the last decimal place of the displayed number; for larger or smaller increments, add or remove a digit.  When “auto” is checked, the script will automatically quick draw a low-resolution image when a parameter is changed.

The equations only produce interesting images for certain parameters.  If you hit an unproductive range of numbers, you can keep going; you may find another useful range.

Sometimes a low-resolution image looks incomplete.  As the points are generated, they fill in the image in chaotic fashion, and it may take more points to complete some images.


Next:  when you want to generate a higher-resolution image, set the desired size, oversample level, and density, and click draw.  Oversampling starts with an enlarged array of image points, then reduces it to the size of the final image.  The net effect is the recording of points at the subpixel level for increased resolution.  This comes at the expense of processing time and computer memory; oversampling by 4 means 16 times as many points.  (Note that JavaScript is not as fast as lower-level programming languages.)  “Density” refers to how many points are generated; it is proportionate to the oversampled array size.  Some images need more points than others; if necessary, increase the density field and click add points.

A high oversample level (16) and a low density (1-2) result in a finely-detailed, semi-transparent, three-dimensional “spun glass” appearance that often suggests motion; these images look best with simple color palettes.  High densities and complex color palettes do not work as well with Latööcarfian attractors as they do with icons.


 

If the script is taking too long and you change your mind, click abort.

The information field displays the progress of the script.  The final result consists of the number of generated points, the maximum number of hits that any subpixel received, the elapsed time, and histogram data showing how many subpixels got how many hits.  The position of each histogram entry in the series is also given as a percentile of the total number of hits; the color palette is based on this number.


Last:  apply a color palette.  Several sample palettes are provided.  Make your own by entering hex color and percentile pairs, one per line; then press redraw palette.  A color picker is provided to find hex color values.  Roll the mouse over the image and the percentile of the indicated point is displayed below; this can help to position colors in the palette.  To apply the palette, press recolor the image; recoloring only takes a small fraction of the time that it took to render the image.

(The position numbers do not have to be percentiles; use any numbers and they will be normalized to 0-100.  Omit the number and the color will be skipped.  The entries do not have to be in order; you can reverse the numbers to reverse colors.)

Images differ in their pixel distributions; a given palette may need to be stretched in either direction for the best results. 


When you are happy with the image, right-click the canvas to save it.  Click save beside the parameter field to write the parameter set to the parameter field; replace “name” with a name, then copy and save it to a text file.  Paste a saved parameter set into the field and click load to load it.

russellcottrell.com

As an Amazon Associate, I earn from qualifying purchases.