hi,

I am trying to draw a circle without using cos,sin;

Mainly by the formula x^2+y^2 = r^2;

this is my code , but for some reason its not working. any help?

note: I thought this code would draw the upper halve fo the portion.

float xCor,yCor;

xCor=yCor =0.0;

float five,two;

five = 5.0;

tow = 2.0;

```
for(float xc=0.0, yc = 0.0; xc <= 5; xc+=0.1, yc+=0.1)
{
xCor = sqrt( pow(five,two) - pow(yc,two) );
yCor = sqrt( pow(five,two) - pow(xc,two) );
glVertex2f(xCor,yCor);
}
```