Project: Löömen

The images generated by this project require millions of iterations, therefore it is best to run the project using Scratch’s “turbo mode” hidden feature.

What It Does

Löömen combines aspects of divination, evocation, and generative art. Named for loom, “a tool for weaving,” and lumen, “light,” it is an assemblage for experiments in chaomancy (χάομαντεία) and xenomancy (ξένομαντεία) with attractors.

As described by Clifford Pickover in his book Chaos in Wonderland: Visual Adventures in a Fractal World,1 the Latööcarfians are an intelligent and social species native to the Jovian moon, Ganymede. Their brains resemble eight-bit computers, and they communicate via intricate light patterns displayed on their heads. The Latööcarfians’ chief occupation is dreaming about chaotic mathematical patterns generated by a pair of formulæ. They have thus earned the epithet, “the dream-weavers of Ganyemede,” and each Latööcarfian’s class within their feudal society is determined by the beauty and symmetry of the patterns they dream.

The two equations are:

xt = sin(ytb) + c sin(xtb)
yt = sin(xta) + d sin(yta)

Where the input variables a, b, c, and d are within optimal ranges: a and b between −3.0 and +3.0; c and d between 0.5 and 1.5. Plotting these equations over many iterations will do one of three things:

  1. converge on a fixed point
  2. enter into a cycle
  3. exhibit chaos and gradually fill in some complicated region of the screen

The third result is what the technomancer hopes to encounter. A dream-image so produced may be read as a divinatory response to a query, or employed as an evocative device to summon the dreamer for assistance in matters under their dominion. Think of the Latööcarfians as alien machine færies (cf. machine elves), and Löömen as a kind of computational shewstone—like gazing into a crystal ball or black mirror.

Most dream-images are non-chaotic. The technomancer may interpret these as she sees fit, but unless one is especially interesting, I usually interpret them as a sign to try again later when better prepared.

Along with the four input variables already mentioned, there are several that determine how the dream-image appears within Löömen:

  • x and y offsets — By default, Löömen plots all dream-images by matching the center of the image space to the center of the drawing screen. This works fine for the highly symmetrical dreams of the lords, but asymmetrical images dreamed by crofters and cotters may appear in a region of space not centered at position (0, 0). The xOffset and yOffset variables allow you to plot those asymmetrical dream-images nearer the center of the screen by translating the image’s center. You can also use this in conjunction with the zoom variable to magnify part of a dream-image.
  • zoom — Some dream-images are too large or small to fit properly within Scratch’s screen area. The zoom variable allows you to plot those at a different scale so you can better see them.
  • alpha — The subtle details of the dream-images are obtained by plotting millions of semi-transparent points that become more visible the more often they are hit. When using zoom to magnify a dream-image, fewer pixels are drawn to the screen (because more pixels’ positions lie outside the screen area), so it often helps to decrease the transparency of the plotter pen, which is accomplished by increasing the alpha variable. The range is 0 (completely transparent) to 255 (completely opaque), and the default is 5. Values from 15 to 127 are usually good for magnified dream-images or those drawn with fewer than many millions of iterations.
  • maximum number of iterations — The dream-images are generated by iterating millions of times through the equations. 10 million is the default numbers of times, but you may override that during plotting.


From Löömen‘s main menu there are three ways to go, which, if this is your first time interacting with the project, I recommend taking in order:

  1. View a gallery of known Latööcarfian dream-images. You can use left and right arrow keys to navigate back and forth through the images, and the space key will return you to the main menu.
  2. Plot one of the known images from the catalog. You can also add or erase newly generated images from the catalog.
  3. Plot an unknown dream-image by generating new values for a, b, c, and d using four vertical sliders you may manually position or let the program move randomly.

The control panel sliders and buttons may be manipulated with a mouse or, if you have a touchscreen monitor, with your finger.

There are several keyboard controls available while the plotter is drawing:

  • x specify new xOffset value (redraws image)
  • y specify new yOffset value (redraws image)
  • z specify new zoom value (redraws image)
  • a specify new alpha value (redraws image)
  • m specify new maxIterations value (redraws image)
  • left arrow change xOffset by −10 (i.e., pan left; redraws image)
  • rightarrow change xOffset by 10 (i.e., pan right; redraws image)
  • up arrow change yOffset by −10 (i.e., pan up; redraws image)
  • down arrow change xOffset by 10 (i.e., pan down; redraws image)
  • w change zoom by 10 (i.e., zoom in; redraws image)
  • s change zoom by −10 (i.e., zoom out; redraws image)
  • v show/hide plot variable values
  • c show/hide counter value
  • t show/hide start and end timestamps
  • l save current plot values to the catalog
  • e erase an entry from the catalog

When Löömen finishes plotting the dream-image, the counter stops increasing and start and end timestamps are displayed. You may press the ‘l’ key to log the variable values that generated this image (so that you may draw the same image again later), or if you wish to save the image as a PNG file: type ‘c’ to hide the counter, ‘t’ to hide the timestamps, and right-click on the screen and select save picture of stage.

If you would quickly get a general outline of the kind of dream-image Löömen is going to plot, while the plotter is drawing, press the ‘a’ key to specify a new alpha value of 255 (fully opaque), which requires only a few thousand iterations to produce a recognizable image. This also works well in conjunction with using the arrow and zoom keys to navigate the image space. Once you know you have what you want to see within the screen’s boundaries, you can type ‘a’ again to specify a lower alpha value and then let Löömen iterate many millions of times to generate a more complex image.

Physical Computing with Löömen

I originally developed Löömen in Processing, for the Emotiv EPOC electroencephalographic brain-computer interface. While wearing the EPOC, the sorcerer performs a ritual intended to establish telepathic contact with the Latööcarfians. At the ritual’s climax, the neuroheadset takes four measurements of the sorcerer’s psychophysical state, which are mapped to the four input variables.

For the Scratch version of Löömen, I replaced the neuroheadset with a GUI control panel having four vertical sliders whose positions map to the input variables. Using a PicoBoard, you could add four physical slide or rotary potentiometers, which you could divine the positions of using a stick plate or pendulum. Or, you could program Löömen to generate random values until you perform some gesture such as touching a magic object connected with Makey Makey.

How It Works

Much of this was already covered above. Löömen has eight sprites that communicate via broadcasting and receiving messages.

  • Plotter — draws the dream-images, and more
  • Gallery — displays the gallery
  • SliderASliderD — controls to set new input values
  • BttnRndm (Button Random) — control to randomize the four sliders
  • BttnSbmt (Button Submit) — control to submit input values corresponding to the current slider positions, to Plotter

The stage controls the main menu and responds to the selected option.

Make It Better

  • Pickover’s book gives some formulæ for generating mutations (see Appendix A in Chaos in Wonderland). Edit the project to include allow for mutations to be generated.
  • Having generated some range of dream images that are meaningful to you, modify Löömen (or make a separate project) so that you may divine from a random selection of one or more of those images rather than generating new ones.
  • The Plotter sprite is bloated: it includes many scripts that are not directly involved in plotting dream-images. You could separate these out into one or more other sprites that handle tasks such as adding or removing records from the log lists, and update the plotter’s local variables with these values when it comes time to draw an image from the log, or update the log sprite’s local variables with those from the plotter when writing the current dream-image to the log.

  1. Pickover is a prolific author and I recommend reading all he has penned, but of special interest here are his first four: Computers, Pattern, Chaos, and Beauty (1990); Computers and the Imagination (1991); Mazes for the Mind (1992); and Chaos in Wonderland (1994).