Objective-c implementation of Ken Perlin's noise function