Page 1 of 1

Brightness confusion

Posted: Tue Nov 14, 2017 4:10 am
by jonniemarbles
I'm aware there is a post about this in the FAQ but I will admit I found it confusing, partly because it refers to syntax several years out of date. I want to create a rule that starts bright but gets dimmer with each iteration. I've yet to find a way to make this work: my attempts either result in totally bright or totally black shapes.

I understand that the problem here is (generally) that the rules are resetting each other, but how do I fix it?

For example, let's say I want the following shape to start bright and dim to 0.8 of its previous value with each iteration:

Code: Select all

startshape THING

shape THING
{
SQUARE[s 1 saturation 1 alpha 0 b 0.8 hue 150]
THING[y 1 s 0.98 b 0.8] 
}
How would I make that happen? Many thanks in advance, sorry for the noob question.

Re: Brightness confusion

Posted: Tue Nov 14, 2017 11:54 pm
by MtnViewJohn
I would do it like so:

Code: Select all

startshape THING[b 0.8]
// Increases initial brightness from 0 to 0.8

shape THING
{
    SQUARE[s 1 saturation 1 alpha 0 hue 150]
        // b 0.8 has been removed
    THING[y 1 s 0.98 b -0.1] 
        // This makes each generation a little less bright
}