while (ptIter.hasNext()) {
Vector p2 = ptIter.next();
double dist = measure.distance(p1, p2);
// Put all points that are within distance threshold T1 into the canopy
if (dist < t1)
canopy.addPoint(p2);
// Remove from the list all points that are within distance threshold T2
if (dist < t2)
ptIter.remove();
}
}