Instead of uniform buckets, Lloyd-Max places centroids to minimize mean-squared error under the actual data distribution. This animation exposes the two substeps separately: one step moves the centroids to the center of mass of each bucket, and the next step moves the boundaries to the midpoints between centroids.