i am at the moment implementing for debug-purposes the hugo elias algorithm under openframeworks. However, this hasn't much to do with the real question.
In
http://freespace.vir...ics/x_water.htm
He is creating buffer1, buffer2
buffer1 = new int[width * height];
buffer2 = new int[width * height];
without initializing them later as follows:
tdlu = buffer1[i-1] + buffer1[i+1] + buffer1[i - width] + buffer1[i + width];
buffer2 = ( tdlu / 2 - buffer2);
buffer2 -= (buffer2 >> 5); //(int)(buffer2*damping);
if its not properly when i initialize buffer1,buffer2 with 0 or random values expect random numbers between the int limit
buffer2 = ofRandom(-2147483648, 2147483647);
It would be cool if someone knows this ;)
thank you very much