I tried to convert this pseudocode

function IntNoise(32-bit integer: x)
    x = (x<<13) ^ x;
    return ( 1.0 - ( (x * (x * x * 15731 + 789221) + 1376312589) & 7fffffff) / 
1073741824.0);    
end IntNoise function

from this website
http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

to python. But it seems to rely on wraparound within the 32 bit int.
Can you duplicate this behavior in python?

Alan

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to