Calculator-generated Images

Library of images to use as OFFIMG screens on the DM41X and DM42
Forum rules
Do you have a creative streak? Post your OFFIMG photos here.

Images MUST be in Windows-NT .bmp format at a resolution of 400x240 pixels and 1-bit colour depth or they will not be displayed by the DM42. Images that do not meet this requirement will be removed from the forum :)
Post Reply
DavidM
Posts: 14
Joined: Mon Nov 13, 2017 8:31 pm

Calculator-generated Images

Post by DavidM »

Most of the images posted so far are based on photos or hand-drawn imagery. How about some calculator-generated art? The images below were all created on an HP calculator and then converted to bmp files for use as an off image. Here's a couple of examples to give you a general idea of what this is about (the lists of numbers are explained below):

{ 40 46 112 60 2 2 -2 2 1200 }
Image

{ 264 207 360 138 24 23 -24 -23 374 }
Image

The algorithm used to create these is fairly simple:

We start with a blank "canvas" of 400x240 pixels, with the (0,0) origin point at the top left (positive values go right and down).
  1. Draw an arbitrary line, defined by the positive endpoints (x1,y1) and (x2,y2)
  2. Offset each of the endpoints by some predetermined amount (could be positive or negative)
  3. If either of the newly-offset endpoints are now "out of bounds" for the given dimensions, reverse the sign of the offset value for the appropriate endpoint component(s) and re-compute in order to bring it back onto the image canvas
  4. Draw the line defined by the newly-offset endpoints
  5. Repeat from step 2
This is essentially the standard "bounce off the walls" algorithm, where some image floats around inside of a box, bouncing off of the walls that confine it as it moves. Each endpoint is treated as an independent object that moves as defined. In the traditional approach, the previously-drawn line would be erased so as to imply movement within the box. In this case, we simply leave each line intact. The resulting pattern that accumulates is sometimes amazingly coherent.

If the initial values of line endpoints and offsets are simply chosen at random, the result will usually just be an inconsequential blob. The more lines that are drawn, the less interesting the result will be.

As I experimented with this algorithm, I found that the probability of an interesting result increased significantly when I constrained the parameters in specific ways. One such method was used for all of these examples. I'm sure there are other approaches, but the one I've used here continues to provide good results fairly often so I haven't tried other methods (yet). You can probably see what I've settled on for these by simply looking at the values of the parameters supplied. The results have occasionally been quite surprising.

Each of the images is identified with 9 parameters: { x1 y1 x2 y2 dx1 dy1 dx2 dy2 count }. Lines are drawn from (x1, y1) to (x2, y2), then each endpoint is offset with dx1, dy1, dx2, and dy2. "count" is the number of steps required to render the image as shown.

Some remind me of "string art":
{ 45 222 20 36 5 -3 -5 3 160 }
Image

{ 96 176 40 232 -8 8 -8 8 300 }
Image

{ 104 72 16 66 4 -6 -4 6 400 }
Image

{ 290 156 260 45 -5 3 5 3 160 }
Image


Some have intricate detail in the interior. Note that some browsers blur the images in web pages slightly, so the detail may not be as clear here as it will be on the calculator display:
{ 11 225 55 75 11 -15 -11 15 1184 }
Image

{ 63 155 217 93 7 31 7 -31 464 }
Image

{ 231 165 396 154 -33 11 -33 -11 572 }
Image

{ 264 216 216 99 -12 9 -12 -9 1836 }
Image

{ 294 114 98 209 -14 -19 14 -19 754 }
Image

{ 294 153 378 17 14 -17 -14 17 870 }
Image

{ 352 84 304 210 16 21 -16 -21 600 }
Image

{ 352 180 336 120 -16 -30 16 30 400 }
Image


Some have subtle patterns within patterns:
{ 20 40 115 60 5 -20 5 20 480 }
Image

{ 30 32 60 56 15 8 -15 -8 540 }
Image

{ 32 34 24 68 4 17 -4 -17 600 }
Image

{ 72 46 48 34 -4 -2 -4 2 1200 }
Image

{ 75 16 30 40 -15 -8 -15 8 540 }
Image

{ 90 30 9 36 -9 -2 -9 2 720 }
Image

{ 104 75 40 15 8 -15 8 15 800 }
Image

{ 200 21 290 119 5 -7 5 -7 1120 }
Image

These are just a sampling of what I've encountered so far.
Post Reply