Draw a random transition
in
Programming Questions
•
1 year ago
I'm trying to generate a random color transition with a few restrictions.
I want to change each HSB value like I can change the RGB values in Photoshop with a curve like this:
Of course processing needs the mathematical function to describe this gradient. (my first problem)
My second problem is generating random curves with a restriction that the curve never drops like this:
Here is what I got so far:
I'm a beginner, so bare with me.
Rheinhard
I want to change each HSB value like I can change the RGB values in Photoshop with a curve like this:
Of course processing needs the mathematical function to describe this gradient. (my first problem)
My second problem is generating random curves with a restriction that the curve never drops like this:
Here is what I got so far:
- void setup(){
size (300,300);
}
void draw() {
colorMode(HSB);
float h = 1.;
float s = 1;
float b = 1;
for (float i = 0; i < 300; i++) {
stroke(h, s, b);
line(i, 0, i, 300);
h += 0.5;
s += 0.3;
b +=0.8;
}
}
I'm a beginner, so bare with me.
Rheinhard
1