Posted: Fri Jul 29, 2005 9:47 am
You'll have to change your avatar, John !
~A discussion of the program Context Free and the CFDG language~
https://www.contextfreeart.org/phpbb/
https://www.contextfreeart.org/phpbb/viewtopic.php?f=9&t=211
Code: Select all
hue = 60 # set hue to 60 (idea 1)
hue 30 # add 30 to hue
hue +30 # add 30 to hue since 30 = +30
hue -30 # add -30 to hue (substract 30)
Code: Select all
s=1 # ?
s 1 # keeps size the same
s 2 # multiply size by 2
s 0.5 # divide size by 2
Code: Select all
sat = 0.5 # set saturation to 0.5
sat 0.5 # move saturation 50% closer to 1
sat -0.5 # move saturation 50% closer to 0
Code: Select all
|hue = 60 # set hue limit to 60
|hue 30 # add 30 to hue limit
|hue -30 # substract 30 to hue limit
Code: Select all
|sat = 0.75 # set saturation limit to 0.75
|sat 0.5 # move saturation limit 50% closer to 1
|sat -0.5 # move saturation limit 50% closer to 0
Code: Select all
sat 0.5| # set saturation 50% CLOSER to limit
sat -0.5| # set saturation 50% AWAY from limit (thus towards 0 or 1 depending on the relative positions of saturation and its limit)
Code: Select all
hue 0.5| # set hue 50% closer to limit, through the SMALLEST path, or counter-clock-wise if 180°
hue -0.5| # se hue 50% closer to limit, through the LONGEST path, or clock-wise if 180°
Code: Select all
# other parameters
r = 30 # set angle to 30 degrees absolutely (0 is horizontal)
r 30 # add 30 degree to angle
|r = 60 # set angle limit to absolute 60 (0 is horizontal)
r 0.5| # set angle 50% closer to limit, through the SMALLEST path, or counter-clock-wise if 180 °
# two-values parameters
|s 2 # multiply x and y size limits by 2
|s 3 2 # multiply size limit x by 3, and size limit y by 2
s 0.5| # move both x and y size 50% closer to their limits
s -0.2| # move both x and y size 20% away from their limit, thus closer to 0 (same as "s 0.8")
s 2 0.5| # multiply x size by 2, and move y size 50% closer to its limit
# problems
s=2
|s=2
x=2
|x=2
x 0.5|
Code: Select all
|||sat 0.4
||sat 0.5|
|sat 0.1|
sat 0.5|
Code: Select all
x 2 # add 2 to x, in the x geometry given by x's scale, like today
*x 2 # multiply x scale by 2, like today's "size 2 1"
Code: Select all
s 0.5 # divide s by 2, already
s -1 # multiply s by -1, already
# I mean :-P
*x 0.5 # divide *x by 2
*x -1 # multiply *x by -1
Code: Select all
# other parameters
r = 30 # set angle to 30 degrees absolutely (0 is horizontal)
r 30 # add 30 degree to angle
|r = 60 # set angle limit to absolute 60 (0 is horizontal)
r 0.5| # set angle 50% closer to limit, through the SMALLEST path, or counter-clock-wise if 180 °
# two-values parameters
|s 2 # multiply x and y size limits by 2
|s 3 2 # multiply size limit x by 3, and size limit y by 2
s 0.5| # move both x and y size 50% closer to their limits
s -0.2| # move both x and y size 20% away from their limit, thus closer to 0 (same as "s 0.8")
s 2 0.5| # multiply x size by 2, and move y size 50% closer to its limit
As you said earlier, scaling logarithmically in hue and space at the same time produces a linear gradient. But I am still a fan of providing hooks for limiting recursion depth, which could be used for linear hue gradients or linear rotation gradients.But linear gradient from red to yellow are still out of reach (are they ?).
Code: Select all
hue 0.5| # set hue 50% closer to limit, through the SMALLEST path, or counter-clock-wise if 180°
hue -0.5| # set hue 50% closer to limit, through the LONGEST path, or clock-wise if 180°
Code: Select all
hue 0.5| # set hue 50% closer to limit, counter-clock-wise
hue -0.5| # set hue 50% closer to limit, clock-wise
Oups, no, I don't agree (I still don't read well...)MtnViewJohn wrote:What we could do is apply the scaling concept to size, rotation, skew, x, and y (but not flip). This modifies the adjustment before it gets multiplied into the transform matrix and is lost. But, '*x 2' is not the same as 'size 2 1' because it only changes the positions of shapes. It doesn't change their size.
Code: Select all
startshape scene
rule scene {
toto { s 2 1 }
toto { y 1 }
}
rule toto {
SQUARE { }
SQUARE { x 1 b 0.5 }
}