K-means partitions n data points into k clusters by iteratively assigning each point to its nearest centroid, then moving each centroid to the mean of its cluster. The algorithm converges when centroids stop moving.
Click anywhere on the canvas to place data points, or add random points.