Author |
Message |
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Context Free Art
I know some of you like coding. I know some of you like art. I've just rediscovered this gem of a program and thought I'd share. http://www.contextfreeart.org/Basically, you code pictures with some simple rules, like the ones at the bottom of this post and make pictures that way. Recently some cool stuff has been added like the ability to code primitives and grids and whatnot, but whatever. The cool thing is that it's all based on chance, so one set of rules can produce a huge number of variations (which you can also share w/ the alphanumeric seed) Here's an example output (ALI variation of below, I think): Reading through the code should be self explanatory to anyone who's done programming before, otherwise see http://www.contextfreeart.org/mediawiki ... CFDG_HOWTOCode: startshape C background {b -0.9} rule C { A {b 0.2}} rule A {//base Z {} A {y 1 hue 1} //spin the hue for coloured lights } rule A { Z {} A {y 1 hue -1} } rule A { //LIGHT SQUARE {s 0.5 b 1 hue 40 sat 1 z 0.1} Z {} A {y 1} } rule A 0.1 {//levels A {z -2 b -0.2} } rule A 0.1 { A {z 2 b 0.2} } rule A 0.5 {//rotation A {r 90} } rule A 0.5 { A {r -90} } rule A 0.01 {//fork A {r -90} A {r 90} } rule A 0.5 { //medium "room" B {x -2 z -0.1} B {x -1 z -0.1} B {x 1 z -0.1} B {x 2 z -0.1} A {} } rule A { //small "room" B {x -1 z -0.1} B {x 1 z -0.1} A {} } rule B { Z {} B {y 1} } rule B 0.5 {} rule A 0.01 {} rule Z { SQUARE {} SQUARE {s 1.1 z -0.5 b 0.1} SQUARE {s 1.3 z -1 b -0.4} SQUARE {s 1.5 z -100 b -1} } It'd be cool to see what you guys do with this. I used to use them for inspiration for drawings.
|
Mon Sep 20, 2010 11:07 am |
|
|
Seraph
Moderator Hero
Joined: Sun Dec 24, 2006 11:28 pm Posts: 868 Location: London Server
|
Re: Context Free Art
Really off topic, but if someone could use that to make a base in CC I would buy them a pint. (All legal restrictions apply)
|
Mon Sep 20, 2010 11:36 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Context Free Art
That's very likely what I was getting around to. Problem is you'd have to use the algorithm to spit out bunkermodule code, not squares. If someone wants to write a converter, though, I can write a mapgen (maybe)
|
Mon Sep 20, 2010 9:11 pm |
|
|
Petethegoat
Joined: Mon Jun 15, 2009 4:02 pm Posts: 905
|
Re: Context Free Art
Rather than writing a converter, I would have thought it'd be easier to make your own tile-based random walk map gen and then use a bitwise tile map to get the bunker modules to place.
Last edited by Petethegoat on Mon Sep 20, 2010 9:23 pm, edited 1 time in total.
|
Mon Sep 20, 2010 9:18 pm |
|
|
caekdaemon
Data Realms Elite
Joined: Sun Nov 01, 2009 3:00 pm Posts: 4144 Location: Hell.
|
Re: Context Free Art
I don't recognize that coding type, the one im used to is sort a like this Probably on my side though.
|
Mon Sep 20, 2010 9:20 pm |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Context Free Art
caekdaemon wrote: I don't recognize that coding type The language is native to the program. Petethegoat wrote: Rather than writing a converter, I would have thought it'd be easier to make your own tile-based random walk map gen and then use a bitwise tile map to get the bunker modules to place. Indeed, but considering how flexible CF is it'd be easy to write different rules for different layouts, and even get terrain generation happening at the same time.
|
Mon Sep 20, 2010 9:30 pm |
|
|
Petethegoat
Joined: Mon Jun 15, 2009 4:02 pm Posts: 905
|
Re: Context Free Art
That is true. You mentioned in the OP that you can have it do grids? Time to do some experimentation with this, I think.
|
Mon Sep 20, 2010 9:38 pm |
|
|
Areku
Joined: Fri Oct 17, 2008 9:46 pm Posts: 5212 Location: The Grills Locker.
|
Re: Context Free Art
Well I have to say this is awesome. I never though I would be so happily spending hours of my life creating images with mathematical formulae. Plus, this program is almost criminously easy to learn to use. On a sidenote, I think I've discovered the mathematical equivalent of creepy:
|
Tue Sep 21, 2010 2:12 am |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
Re: Context Free Art
How do you do that?
I am quite thoroughly impressed.
|
Tue Sep 21, 2010 2:17 am |
|
|
Areku
Joined: Fri Oct 17, 2008 9:46 pm Posts: 5212 Location: The Grills Locker.
|
Re: Context Free Art
Basically, reducing cartoony faces to simple shapes (almost everything is a circle) and telling the program to place them in a semi-random disposition over an offset. The cool part is that it's purely vectorial, so I can get it in any size I want. See? EDIT: Oh, and I can post the code if you want. Made it this afternoon.
|
Tue Sep 21, 2010 2:22 am |
|
|
Disst
Joined: Thu Feb 12, 2009 1:47 am Posts: 1182
|
Re: Context Free Art
Please do.
|
Tue Sep 21, 2010 3:07 am |
|
|
Areku
Joined: Fri Oct 17, 2008 9:46 pm Posts: 5212 Location: The Grills Locker.
|
Re: Context Free Art
Here it is. Just copypaste it into the console. But you probably already know that.
|
Tue Sep 21, 2010 3:15 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Context Free Art
Wow, for whatever reason I am spectacularly failing to accomplish anything worthwhile with this program
the online documentation (or lack thereof) doesn't help much
|
Tue Sep 21, 2010 4:22 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Context Free Art
The Gallery is the best place to find examples of code, paul. Areku, that's cool. Something about a million creepy faces is fun.
|
Tue Sep 21, 2010 5:38 am |
|
|
Areku
Joined: Fri Oct 17, 2008 9:46 pm Posts: 5212 Location: The Grills Locker.
|
Re: Context Free Art
Grif wrote: the online documentation (or lack thereof) doesn't help much Just check the Shape Adjustments page. Quick reference without all that clutter from the rest of the site.
|
Tue Sep 21, 2010 2:41 pm |
|
|
|