calculate the position of a circle, random circles, reset functionality