Wednesday, November 5, 2014

Thoughts and interpretations on the Perlin Noise Algorithm

Perlin noise

  I've examined the algorithm and could weigh in a little opinion geometrically speaking concerning the algorithm.  Mostly this is likely echoing a number of blogs on the subject matter.

  Firstly as a key to the algorithm, there are a number of key components to the method:

  A gradient field is given to random noise generation.  The gradient field itself appears to be randomly generated, but the actual coordinate position do not have randomly generated noise.   If this were the case, each and every point would be incoherent in terms of noise relations which is certainly not the case, meaning that each an every coordinate point would be entirely random and such a noise field would appear truly as something like 'white noise', instead there is an inter relation between the coordinate positions and randomly generated gradient noise.

  In the two dimensional case, the mathematics that one might describe geometrically speaking is given to a process of vector magnitude product weighting between the Gradient field at its coordinate node point (these, gradient nodes are given to whole integer coordinate representations), and the actual coordinate position which is not required to be coincident to any node but between them...in other words, the actual 2d (x,y) coordinate position is any real number coordinate representation and not restricted to the two dimensional set of integers (I,J) that the gradient field is restricted.  The actual dot product formulation geometrically is the magnitude product of two vectors in the direction of one such vector.  This can be thought of as product weighting in other words, but its not necessarily the same as mathematical averaging.

All coordinate positions in two dimensions, falls inside of a four coordinate gradient node grid position...that is on the set of integers, any real two dimensional coordinate can be found inside a integer boundary derived square.  There are plenty of blogs that mention this example by example, so I'll avoid further expounding on this.  This square however that forms the boundary of the coordinate position is where the gradient nodes (vertices of the gradient square) come into play determining the noise at such coordinate position.

Each particular gradient coordinate node is actually weighted according to the non gradient coordinate position, that is, between the gradient node and the coordinate position that we wish to compute in so far as a perlin noise value.  Once the dot product between all surrounding gradient node positions have been computed which determines each coordinate to node weighted gradient 'noise' scalar (at a given gradient node), a linear interpolation takes place between the upper and lower y node boundaries on both given x axis respectively, this determines the Perlin noise interpolated position at the actual coordinate x position between such weighted gradient scalars on the upper and lower boundaries of the gradient grid coordinate system, and then having computed the linearly interpolated position for the y coordinate position between the gradient nodes upper and lower y boundaries.    We are determining a noise factor between all such weighted node gradient scalars to the actual coordinate position.  This noise has coherence because of a drawn mathematical coherence between a randomly generated gradient noise field and the mathematical smoothness provided both in weighting the gradient field according to individual coordinates coupled with interpolating processes which graduates the degree of randomness so that neighboring coordinates are inter related in a quasi statistical like manner concerning the randomly generated gradient noise field.  Basically the coordinate position's noise comes by way of the influence of four different gradient node positions (nearest to such coordinate), and as one more closely approaches a coordinate point from a neighbor position, similarities in noise should mathematically occur in the two dimensional problem.

I'd say additionally that the gradient field seems a bit fancy, likely a good choice of descriptive words, but basically could be the same as saying a randomly generated vector field in another way.  Unless I am missing something by way of the mathematics here.  Generating the gradient field in two dimensions is given to the restriction of a random vector bound to the unit circle, for example, or not really a complicated process.   

No comments:

Post a Comment

Oblivion

 Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...