Constructing an Image

This page shows how an image is generated for a level in my proram.  

I’ll use this image from the 3rd week of images of the day:

There is a Setting for Everything

I noticed while writing this that I kept saying “there are several options for this” or “this is configurable but”, so I will just say it once at the beginning:  there is a setting for everything, and most of them I never touch.  

Additionally, all of the settings and line colors are saved for each image generated so that I can reproduce the image and make changes to the settings/line colors if I want to.  

Selecting the Line Colors

Prior to generating the image, my program randomly selects a color from each line based on a color palette that is either pre-determined or randomly selected.  The colors for the shorter lines (<= 15 cells) use a subset of the palette that only includes the darker shades (so that the main pattern stands out more).  

The program used a theme that I called Medium 24 Tint for this particular image. 

The Three Layers

There are 3 layers to the image:

  1. The line glow layer (bottom)
  2. The lines (middle)
  3. The similarity shading layer (top)

These are usually drawn on a black background, though the background isn’t added until the program adds the similarity shading layer.  

The Line Glow Layer

This is generated by drawing the lines in three different widths with different opacities: 

  1. A narrow line (highest opacity)
  2. A wider line
  3. An even wider line that fills each cell that the line passes through (lowest opacity)

The opacities I currently use are 100%, 50% and 5%.  Here is the resulting image: 

You might need to use the zoom feature to see where the border between the narrow and medium lines.  

The program then blurs this image in several passes (usually set at 6, with a blur radius of ~70% of the cell width), which results in the following image: 

The Lines

Next, the lines are drawn on top of the line glow layer.  The lines use a unique smoothing algorithm that follow the line glow layer and result in a gravity effect (see:  The Natural Line Update).  There are many different settings here as well, but I won’t go over them right now.  Here is the resulting image: 

The Similarity Shading Layer

See:  Similarity Maps for detail on how the maps are generated.
See:  Shading Options for detail on the options that control the appearance of the similarity shading layer. 

Here is the similarity shading layer used for this image: 

Here is the resulting image after overlaying this to the previous image – which is drawn on a black background:

  

A Final Contrast Adjustment

After the similarity shading is added, the program automatically increases the contrast (again, configurable, but currently set at +17):

In case you were wondering why the colors looked dull prior to this contrast adjustment – this is because the color palettes I use take the contrast adjustment into account.   

Why All of This?  Why Not Just Draw the Lines? 

The short answer:  I think it makes the images look better.

The medium answer:  The layers help create a dynamic quality to the images that the lines on their own do not.  This helps to create a wide variety of different looks (with help from the variety of color palettes) that keeps me interested in looking at new images even after I have seen over 100,000 images for over 4,000 levels.