Seed:
Equation:
Color:
Range:

Instructions

This tool is a companion to the EquArt generative art bot.

You can generate an image from a seed (either manually entered or randomly generated) or you can enter your own equation. You can also adjust the color range used.

When creating your own equation there are a few rules to follow:

If a problem occurs when parsing your equation, an error will be displayed that shows the parsing result so you can try to understand your error.

Image generation details

  1. Equation generation

    Functions start out as a single place holder symbol. Place holder symbols are repeatedly replaced by equation phrases. Some equation phrases only contain an operand but others contain operators and additional place holder symbols. Equation phrases are selected randomly but are weighted so some are selected more frequently than others. Additionally, the weighting changes depending on the equation length to try to avoid very long and very short equations. Equation generation is complete when no place holder symbols remain in the equation.

    The random number generator used is seeded and returns the same sequence given the same seed so equation generation is deterministic based on the seed.

  2. Equation selection

    In order to avoid overly simple or entirely random images, the complexity of the image generated by the generated equation is measured. If the complexity is either too high or too low the equation is discarded and another one generated.

    To estimate the equation complexity, the equation is evaluated and the resulting image is compressed. It is assumed that the compression ratio implies something about the image complexity.

    The high and low thresholds used for equation selection were emperically selected. However, the line between beauty and randomness is fine and the high threshold was selected to try and avoid rejecting attractive images at the expense of sometimes accepting random looking images.

  3. Image rendering

    Before rendering the image, a base color and color range are randomly chosen as the color palette.

    For every pixel in the image, the selected equation is evaluated with the current pixel location used for the x, y operands in the equation. The resulting value is mapped into the range [0:360) via the modulus operator and then linearlly mapped into the color palette previously selected. Any Infinities or errors generated when evaluating the equation are mapped to the palette's base color.