# I was expecting a circle to trace a path of parabola . why isnt that the case?

Why isn't the rendered shape a parabola?

@Override
public void render () {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
renderer.begin(ShapeRenderer.ShapeType.Filled);
position.x += 1;
position.y = position.x * position.x ;
renderer.end();
}

• It's difficult to convey the motion of the circle with a still screenshot. Have you considered recording a video or an animated gif with something like LICEcap? – DMGregory Jul 8 '17 at 17:10
• Why isn't the rendered shape a parabola? You only render a circle... – Cedric Martens Jul 8 '17 at 17:23
• you're clearing your buffer every step. – Sidar Jul 8 '17 at 17:59
• If you've solved your problem, please consider describing your solution in an answer, and marking it accepted. This helps give the question some closure, so the system won't keep bumping it to attract new answers. – DMGregory Jul 9 '17 at 2:39

Your function acts like the y = x^2 function:

As you can see, it acts the same for positive and negative arguments, but it's mirrored through the Y axis. To achieve a parabola, you need to give it a range like (-5,5) or (-100,100). What you probably did is you set the x to 0 or 1.

In order to achieve what you want, you should write:

float xOffset = 100;

@Override
public void render () {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
renderer.begin(ShapeRenderer.ShapeType.Filled);
float newX = ++position.x;
position.x = xOffset + newX;
position.y = newX * newX;

The xOffset will move your entire circle by x pixels right.