In general, input of this algorithm is large set of points in space that describe any area of space. The output of this algorithm is significantly smaller set of point in space that describe the same area of space as input points.

At the start of algorithm, set of new points (neurons) is generated. The positions of neurons are generated randomly but its in the same space as input points. So we have to find minimal and maximal values of input points in all dimensions before neurons positions generation.

The algorithm then works iteratively - in each iteration we compute distance between each neuron and each input point. According to this distances we move all neurons.

You can see how this algorithm works in DemoGNG java applet from Hartmut S. Loos and Bernd Fritzke.