{ 40 46 112 60 2 2 -2 2 1200 }
{ 264 207 360 138 24 23 -24 -23 374 }
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).
- Draw an arbitrary line, defined by the positive endpoints (x1,y1) and (x2,y2)
- Offset each of the endpoints by some predetermined amount (could be positive or negative)
- 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
- Draw the line defined by the newly-offset endpoints
- Repeat from step 2
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 }
{ 96 176 40 232 -8 8 -8 8 300 }
{ 104 72 16 66 4 -6 -4 6 400 }
{ 290 156 260 45 -5 3 5 3 160 }
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 }
{ 63 155 217 93 7 31 7 -31 464 }
{ 231 165 396 154 -33 11 -33 -11 572 }
{ 264 216 216 99 -12 9 -12 -9 1836 }
{ 294 114 98 209 -14 -19 14 -19 754 }
{ 294 153 378 17 14 -17 -14 17 870 }
{ 352 84 304 210 16 21 -16 -21 600 }
{ 352 180 336 120 -16 -30 16 30 400 }
Some have subtle patterns within patterns:
{ 20 40 115 60 5 -20 5 20 480 }
{ 30 32 60 56 15 8 -15 -8 540 }
{ 32 34 24 68 4 17 -4 -17 600 }
{ 72 46 48 34 -4 -2 -4 2 1200 }
{ 75 16 30 40 -15 -8 -15 8 540 }
{ 90 30 9 36 -9 -2 -9 2 720 }
{ 104 75 40 15 8 -15 8 15 800 }
{ 200 21 290 119 5 -7 5 -7 1120 }
These are just a sampling of what I've encountered so far.