I tried to make a little automaton where each cell, having a copy of the whole picture and the color of adjacent cells, would try to find its own position and therefore its own color. It crashed Processing a lot. Zarba - Thu 13 May, 18:16:04 |
Mm, that's exactly what I was trying to do. "Based on the colour of all adjacent pixels, which pixel in this picture am I most likely to be?" - it just flickered randomly a lot, although I was using fairly bland pictures. I should try it with a more varied-pixel photograph, or something.
As for Proce55ing crashing, I *think* there's a bug in its random number function (or its int-rounding function), which gives you a number slightly outside the bounds you were expecting, on extremely rare occasions. Which isn't very good for pixel-checking applets. Check your coordinates are still on the screen before doing anything with them. Kevan - Fri 14 May, 09:35:18 |
random(5) will return a number between 0 and 5 -inclusive-, if that will help. Zarba - Fri 14 May, 16:48:36 |
Hmm, I thought I'd checked that, and I thought the boundary errors were much rarer than 1-in-200, but I could be completely wrong.
(My emergent pixelbots were still rubbish when fed an artificial every-pixel-distinct image, by the way. Feh.) Kevan - Sat 15 May, 21:48:03 |
New comments have been disabled for years, now, as this blog is no longer updated. Sorry.