Sign in to follow this  

Hugo Elias Water Ripple Question

Recommended Posts

Hi @ all,

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.



He is creating buffer1, buffer2
buffer1 = new int[width * height];
buffer2 = new int[width * height];[/code]

without initializing them later as follows:
tdlu = buffer1[i-1] + buffer1[i+1] + buffer1[i - width] + buffer1[i + width];
buffer2[i] = ( tdlu / 2 - buffer2[i]);

buffer2[i] -= (buffer2[i] >> 5); //(int)(buffer2[i]*damping);[/code]

if its not properly when i initialize buffer1,buffer2 with 0 or random values expect random numbers between the int limit

[code] buffer2[i] = ofRandom(-2147483648, 2147483647);[/code]

It would be cool if someone knows this ;)

thank you very much

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this