Instead of calling circ() function inside display you could call
glutIdleFunc(nameOfYourChoice);
in your main function after keyboard function. So that function is calling again and again. In the above function (nameOfYourChoice) you can manipulate any variables you want for x's and y's. So in that function you can check if there was a collision between objects and if appear collisions you can "drop" things, in this example boxes, via x's and y's in that function. At the end of that function you have to call
glutPostRedisplay();
Now if you want to get those boxes up again you can use timers(also with your time-step) and then after a certain amount of time you can put those boxes up again via x's and y's obviously.For that you also will need bool variables to know if there was a collision.
So collision happens:
bool flagBox1 = true;
time passed:
bool flagBox1 = false;
//code to put back the dropped object
code in (nameOfYourChoice) function:
if(flagBox1){
//proceed to your actions...
}
All those changes you will pass them in your display function as you did for the circ with
glTranslatef(box1posX, box1posY, box1posZ);
glTranslatef(box2posX, box2posY, box2posZ);
glTranslatef(box3posX, box3posY, box3posZ);
Then render them.
A good practice is to change all your "changeable" variables with a step like a time-step. In that way the hole movement will be depending on that time-step.