Parameterized iteration count for sample. Hack at determining new mean (if less than 0 for both x and y, use old mean).