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

If you're having trouble using Context Free or don't understand the language, ask for help here.

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
Xenharmonica
Posts: 1
Joined: Thu Aug 10, 2006 4:42 pm

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

Post 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??

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post by MtnViewJohn »

Last edited by MtnViewJohn on Tue Dec 26, 2006 10:14 am, edited 1 time in total.

Klaus
Posts: 2
Joined: Mon Nov 27, 2006 4:02 am
Location: Germany

Post 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.

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post 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.

Klaus
Posts: 2
Joined: Mon Nov 27, 2006 4:02 am
Location: Germany

Post 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

WaldoB
Posts: 2
Joined: Sat Dec 23, 2006 1:26 pm

pipe dreams

Post 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...

User avatar
MtnViewJohn
Site Admin
Posts: 882
Joined: Fri May 06, 2005 2:26 pm
Location: Mountain View, California
Contact:

Post 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.

WaldoB
Posts: 2
Joined: Sat Dec 23, 2006 1:26 pm

thanks

Post 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...

Post Reply