Shading
Posted: Thu Sep 24, 2009 5:42 pm
I cant figure out how to shade objects
Can anyone help?
Can anyone help?
~A discussion of the program Context Free and the CFDG language~
https://www.contextfreeart.org/phpbb/
https://www.contextfreeart.org/phpbb/viewtopic.php?f=4&t=789
CF has no instruction to shade objects or shapes. You can do it anyway by different custom methods, depending of what you really want (also a simulation of shading can be found accidently). The best is to look on the code of a design that match what you mean (choose one with few code ;^)i was wondering if you could tell me how to shade certain parts of an image?
itd be great if you could help me out.
thanks a bunch,
karcher
Code: Select all
startshape K
// Make a column of 12 elements …
rule K {12*{y 1.5}AR{}}
// … separated in two parts, one on the right and one on the left.
rule AR {CH{x -.75}ER{x .75}}
// The one on the right is a row of non shaded shapes going on the right.
rule CH 3{NONSHADED{}CH{x -1.5}} //(continue the row)
rule CH {} //(stop it)
// The one on the left is a row of shaded shapes going on the left.
rule ER 3{SHADED{}ER{x 1.5}} //(continue the row)
rule ER {} //(stop it)
// Here is the non shaded shape, satureted with color.
rule NONSHADED {SHAPE {b 1 sat 1}}
// Here is the shaded shape, wich is NONSHADED+ SHADOW.
rule SHADED {NONSHADED {} SHADOW{s .9 x .3 y -.3 z -1}}
// And here is the shadow.
rule SHADOW {30*{s .99}SHAPE { alpha -.99}}
// The shape used for all.
rule SHAPE {SQUARE{}}