News for hackers. Stuff that matters.
Re:Show HN: My weekend project, a graphics/cellular automata... by daeken on Sunday February 27, 2011 @07:20PM (#2269432)
This is a quick, dirty hack I wrote up using JS. It's based on Langton's ant, but adds a lot of new, fun stuff. You can do all sorts of interesting things with it -- a command reference is included. The "docs" were written in 5 minutes, so feel free to ask for clarification. Enjoy!

One of my favorites: http://demoseen.com/langton.html#+..............................

Re:Show HN: My weekend project, a graphics/cellular automata... by Maciek416 on Sunday February 27, 2011 @07:55PM (#2269524)
This is awesome. I'd love to add color generation options.

Here's my favorite so far:

http://demoseen.com/langton.html#*/*/*/*/*/*/*/*/*/*/....

[EDIT: and its cousin: http://demoseen.com/langton.html#*/*/*/*/*/*/*/*/*/*/....+-+... ]

Re:Show HN: My weekend project, a graphics/cellular automata... by daeken on Sunday February 27, 2011 @07:59PM (#2269540)
I've been thinking about color stuff, but just can't come up with how to really do it. However, I think sub-45-degree turning is gonna happen soon. Probably 15-degree to start, and see what can happen there. 45 degree turns do provide some fun stuff, though...

Edit: Just made a small change that will make things look prettier, though. If you have the command string XYZW, the command string XYZWXYZW is 100% equivalent, except for the shading (due to the cell values looping around). So when you put in a command string, it's automagickly extended to > 64 bytes now, guaranteeing smooth shading.

Re:Show HN: My weekend project, a graphics/cellular automata... by Maciek416 on Sunday February 27, 2011 @08:16PM (#2269598)
Perhaps a given automaton could be told to open a bucket of paint and then have that paint expend itself over time (drop in color intensity, increase in opacity, or whatever).
Re:Show HN: My weekend project, a graphics/cellular automata... by daeken on Sunday February 27, 2011 @08:26PM (#2269618)
Oh nice, I quite like that. I'll try it out. Thanks!

Btw, just implemented yet another new feature: the '@' command is an ant bomb. If there are multiple ants in play, @ kills the one that triggers it. That lets you fork without completely annihilating your system.

Re:Show HN: My weekend project, a graphics/cellular automata... by die_sekte on Sunday February 27, 2011 @08:33PM (#2269643)
A color increase/decrease command, which cycles through a palette?
Re:Show HN: My weekend project, a graphics/cellular automata... by daeken on Sunday February 27, 2011 @08:54PM (#2269694)
Alright, both of these are in. $ increments the color, ^ decrements it. In addition, = now causes the child ant to have its color incremented, and < causes the child color to be decremented. Technicolor craziness.

Edit: Really don't like the color stuff. I've left in $ and ^, but I've turned it off for forks. It just looks like random nonsense, sadly.

Re:Show HN: My weekend project, a graphics/cellular automata... by solipsist on Sunday February 27, 2011 @07:41PM (#2269486)
Awesome! I love the ease in which you can send other people your creations using the urls. I wonder if anyone would be up for developing this same type of project, but centered around Conway's Game of Life instead (one of my favorite cellular automata).
Re:Show HN: My weekend project, a graphics/cellular automata... by topherjaynes on Sunday February 27, 2011 @11:58PM (#2270098)
Re:Show HN: My weekend project, a graphics/cellular automata... by wlievens on Monday February 28, 2011 @07:33AM (#2271006)
Nice. I like the "organic" feel of the images you get.

http://demoseen.com/langton.html#+/.<..<....++..........

Re:Show HN: My weekend project, a graphics/cellular automata... by Wilduck on Monday February 28, 2011 @04:42AM (#2270722)
Re:Show HN: My weekend project, a graphics/cellular automata... by nitefly on Sunday February 27, 2011 @09:07PM (#2269730)
I love it! How about the addition of a stop button?
Re:Show HN: My weekend project, a graphics/cellular automata... by daeken on Sunday February 27, 2011 @09:12PM (#2269746)
Done, thanks!
Re:Show HN: My weekend project, a graphics/cellular automata... by joshu on Monday February 28, 2011 @01:11AM (#2270283)
ideas:

allow number suffixes to mean a repeat of the previous token.

.6 would be equal to ......

also, allow the ant bomb with a number to only allow that many ants. @4 means kill this ant if there are more than four.

maybe allow subgrouping?

[+........]12 means 12 of these?

random numbers: .{13,24} means between 13 and 24 of .?

Re:Show HN: My weekend project, a graphics/cellular automata... by chaosfox on Monday February 28, 2011 @06:19AM (#2270902)
Re:Show HN: My weekend project, a graphics/cellular automata... by shadowpwner on Sunday February 27, 2011 @10:03PM (#2269873)
It's beautiful.