Hello! I am so confused...I have a very simple loop that I would really like to be a while loop..however when I do use while, I get nothing...so I started working with a for loop and I do get a picture! But I am not getting the behavior I want.

Ideally I would like:

while (xPos != 0.0){
draw a cube at xPos, yPos
decrement x
decrement y as a function of x
}

//i am starting out the cube at (.75, .75)

and here is my code that will draw a cube--but something really strange is happening, as the cube gets closer to the origin, more and more cubes start appearing then they all kind of meet in the middle and then escape at opposite diagonal ends of the screen?

I have no idea what's going on :-(

Code :
	int i = 0;
 
	//while (xPos != 0.0) {
 
	for (i; i < 200; i++) {
		glTranslated(xPos, yPos, 0.0);
		glutWireCube(.25);
		xPos-=0.00005;	//move in a negative direction along the xaxis	
		yPos = (startYPos*xPos/startXPos);
		glutSwapBuffers();
		glutPostRedisplay();
	}