3 parameter clustering

How does Igor perform K-means clustering with 3 parameters?

Igor is able to find clusters using a wave with 3 rows and n columns. How exactly does it do this?


Thanks !
Here is an example:

1. Create a 3 parameter set of data and divide it into 4 classes
make/n=(3,500) ddd
ddd[][0,99]=enoise(1)
ddd[][100,300]=10+enoise(1)
ddd[][300,399]=20+enoise(1)
ddd[][400,499]=30+enoise(1)

Now execute the KMeans command:
KMeans/init=1/out=1/ter=1/dead=1/tern=1000/ncls=4 ddd


An even better clustering calculation is:
MatrixOP/o ddt=ddd^t
FPClustering/CM/CAC/MAXC=(4) ddt