We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there, I'm trying to get my animation to appear smoother, so I thought I'd take the previous frame and paint it with some transparency onto the current frame. I have done this in another animation, and I pretty much copied it onto this one, so I'm doing something wrong and I can't see it. Also, for some reason translate(width/2, height/2); won't work if written in setup(), which I thought was a bit strange. It would make sense to be able to do the translation only once at the beginning, right?
Here's my code so far:
PImage fade;
void setup(){
size(1280, 720, P3D);
smooth();
fade = get(0, 0, width, height);
}
void draw(){
background(0);
tint( 255, 255, 255, 254);
translate(width/2, height/2);
image(fade, -width/2, -height/2);
noTint();
colorMode(HSB, 100);
filter.paintCircle(bassDominantFreq, 1);
filter.paintCircle(midsDominantFreq, 2);
filter.paintCircle(trebleDominantFreq, 3);
fade = get(-width/2, -height/2, width/2, height/2);
}
Now, as far as I understand, the coordinates should be correct: top left corner would be -width/2, -height/2, and lower right corner would be width/2, height/2.
Any ideas?
Answers
Doesn't run. Error on line 27: Can't find anything named filter.
Ok, I tried to clear unrelated things off the code to make it easier to read. This is it exactly how it is when I run it:
I also wrote other classes, example Filter, but I think they are unrelated to the issue.
Double posted by accident.