updated to sample fractional points and randomly assign colors for any number of classes