Hi Cedric,
em, when I use
Code:color(map(speed,0,maxSpeed,0,60),100,100);
I only get a greish color, that doesnt change at all.
my speed parameter is diffrent for every sphere and it varies between 0.001 and 0.01; max speed is then 0.01
where could I be wrong?
This lerpColor function sound very promising because of the percentage.
I used my speed variable (0.001, 0.01) to get a percantage number between 1, 100 ==> colorPercent = sin(speed*100)*100;
fill(lerpColor(cblue, cred, colorPercent, HSB));
it appears not to work, because the color still dont match the speed
--------------------------------
I^ve just tried something else. Create a colorShift variable from the speed(0.001,0.01) ---> sin(speed*100); so it should give a number between 0 and 1
this I then use to determine how much of red or blue is to be taken.
fill(255*colorShifter, 0, 255-(255*colorShifter));
makes sense to me, but still no effect
Ich bin tiefst verzweifelt.