A basic tutorial I threw together last night

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

Moderators: MtnViewJohn, chris, mtnviewmark

Post Reply
mattpace

A basic tutorial I threw together last night

Post by mattpace »

http://matt-pace.tripod.com


The old tripod account wasn't doing anything, so I gave it a job.


Let me know how we can make it better. Once its great, I am gonna show it to my non-technical friends and try to get some more people on the CF bandwagon.

User avatar
lagroue
Posts: 114
Joined: Wed Jul 06, 2005 11:33 pm
Location: Paris, France
Contact:

Post by lagroue »

That's a great idea.
Let's dive in it !

aqua_scummm
Posts: 17
Joined: Sat Jun 11, 2005 5:44 am
Location: Redwood City, CA
Contact:

Post by aqua_scummm »

yay its actually just me, I forgot i had an account here :)


Time to start posting some cdfgs too. This color stuff is a little odd though...

Dzeni

Typo in Tutorial

Post by Dzeni »

Hi,

Then tutorial is wonderful. Only problem is that in the very first example, there is a typo!

It says:

starshape ci
rule ci { CIRCLE{} }

Which should of course read

startshape ci
rule ci { CIRCLE{} }

It took me ages to figure out why it would not render !

Once started though, it is great fun.

Thanks again

Dzeni :)

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

Post by MtnViewJohn »

Some quibbles:
100% brightness is white and 0% is black, regardless of hue and and saturation.
This is only true for 0% saturation. A 100% bright, 100% saturated square will be in full, glorious color. There is a color space, called HSL, that is always white at 100% brightness, but CF uses the HSB color space. You can think of the HSB color space as being cone-shaped, with the base looking like the color wheel and the tip black. The HSL color space (used by many programs, but not CF) looks like two cones face-to-face. One tip is black, the other is white, and the widest cross-section looks like the color wheel.

The other quibble had something to do with color limits. But then I see at the end of the color tutorial that you asked for help. So I will write something about using color limits.

TheWolfGirl

Error in color description

Post by TheWolfGirl »

You have an error in your description of the color model. You described the HSL model (luminance=0 forces black, luminance=1 forces white). It is differs from HSB/HSV in some significant ways.

First HSB is Hue-Saturation-Brighness, the V in HSV is value. Brightness and value are the same thing. I believe "value" is prefered in the world of non-electronic media.

Saturation mixes between pure color (S=1) and neutral (white-grey-black when S=0).

Brighness shades (scales) the Tint derived from HS (Hue and Saturation). When converting from HSB, RGB are derived from from HS then each is multiplied by brightness. Unlike HSL, the only way to get pure white is to set s=0 and B=1. When S=0, then B is the grey level.

It should be noted that in HSB is S (saturation) linear. It is non-linear in the much more common HSL model. HSB is a better model, but HSL has become predominant at this time.

mattpace

Post by mattpace »

So I no longer have enough time to work on the tutorial, so I am entrusting it to you, the forums. Be nice, no goatse or anything please.


New site:
cftutorial.tripod.com (everything was moved over for you)
login name: cftutorial
password: artcode

FTP:
ftp://ftp.tripod.com
login name: cftutorial
password: artcode

Please leave the email address as mine, I will be able to update it and stuff, and I wont be losing it or anything

shevegen
Posts: 57
Joined: Wed Jul 06, 2005 5:38 am

Post by shevegen »

What would be cool would be a wiki to collect the tidbits :)

Post Reply