for (int i = 0; i < clusters.size(); i++) {
Cluster<? extends NDimPoint> cluster = clusters.get(i);
Color color = colors.get(i);
NDimPoint center = cluster.getBasinOfAttraction();
for (NDimPoint nDimPoint : cluster) {
td.setColor(color);
Shape l = new Line2D.Double(
nDimPoint.getCoord(0), nDimPoint.getCoord(1),
center.getCoord(0), center.getCoord(1)
);
Shape l2 = new Ellipse2D.Double(
nDimPoint.getCoord(0) - rad / 2, nDimPoint.getCoord(1) - rad / 2,
rad, rad