Page 1 of 1

The Commands (I don't even know if this is the proper term)

Posted: Thu Aug 10, 2006 4:45 pm
by Xenharmonica
I understand most of the basics, but I see other users giving examples with strange commands I couldn't even find in the lessons or any of the examples.

one of them was stepAfterStep or something.

Is there somewhere that lists all the commands in a catalog or something??

Posted: Thu Aug 10, 2006 8:39 pm
by MtnViewJohn

Posted: Mon Nov 27, 2006 4:23 am
by Klaus
Hello,

I'm also interested in a kind of catalog or a list where I could find every command with syntax and so on to understand the whole thing, that would be very helpfull! At the time I'm steping in the dark :? , trying a little bit around, but I think there will be much more to explore.

Posted: Mon Nov 27, 2006 11:12 am
by MtnViewJohn
Are you thinking of some sort of single-page summary of the entire CFDG file syntax and semantics? I find that kind of thing very useful. I'll get right on it.

Posted: Tue Nov 28, 2006 4:02 am
by Klaus
Hello MtnViewJohn,

yes, that would be great.

I also like very much the Reference and Learning pages of Processing (of course Processing is much more complex).

http://www.processing.org/reference/index.html
http://www.processing.org/learning/index.html

Thanks a lot MtnViewJohn, where can I find the site?
Klaus

pipe dreams

Posted: Mon Dec 25, 2006 10:05 pm
by WaldoB
MtnViewJohn wrote:You can start here: http://www.contextfreeart.org/wiki/inde ... =CFDGHowto
I've tried this link and it doesn't seem to work, but here's a specific question.

The example file rose.cfdg contains statements that include pipes (|), for example:
{ b 1 sat 1 |hue 60}
and
{ s 0.925 x -0.075 hue 0.3| }

Can someone please explain the effect of those pipes in CFA? Whenever I think I've got it figured out, I get surprised by the result.

I searched the forums and just found references to "pipe dreams" :>)
Maybe there's more than one name for that symbol??

Many thanks in advance...

Posted: Tue Dec 26, 2006 10:35 am
by MtnViewJohn
Oops. I fixed that link. It should have been: http://www.contextfreeart.org/mediawiki ... CFDG_HOWTO

The |hue x and hue x| color modifications are described here.

Briefly, Context Free has a problem with recursive shapes where the color is changed at each generation:

Code: Select all

rule tendril { 
    CIRCLE { sat 1 b 1 }
    tendril {x 0.1 r 0.5 hue 1 s 0.97 }
}

You can't control what the color will be at the tip, at the end of the recursion. If you render this shape in a 576x576 pixel canvas it will run through 200 generations and the tip will be blue-green. If you render it smaller then it will run through 100 generations and the tip will be light yellow-green. So what happens is that you will make a design and tweak it until it looks good, but when you render it at a different size the colors are different and it looks terrible.

|hue x and hue x| help prevent this. |hue x sets a target hue apart from the current hue. hue x| changes the current hue to be closer to the target hue, but never goes past the target hue. In rose.cfdg this forces the color of the center of the rose to always be yellow and never creep past yellow to green.

thanks

Posted: Tue Dec 26, 2006 12:33 pm
by WaldoB
Thanks very much for the quick reply! I found the wiki right after I posted, but your further explanation is quite helpful.

Best wishes...