Q:

Drawing quadrant of a circle

I want to draw all the 1/4 of a circle separately but it my window setup, the origin is on top-left(0, 0). Anyway I can get around to not invert the screen again?
My current implementation is this:
//nX: x
//nY: y
//nR: radius
//verts: std::vector<int>
//indices: std::vector<uint32_t>

verts.push_back(nX + nR); verts.push_back(nY + nR);
for (int i = 270; i >= 360; i -= slice_count)
{
    verts.push_back(nX + cos(DEG_TO_RAD * i) * nR);
    verts.push_back(nY + sin(DEG_TO_RAD * i) * nR);
}

//...
//rest of the code are index manipulation

glDrawElements(GL_TRIANGLE_STRIP, indices.size(), GL_UNSIGNED_INT, &indices[0]);

This one will just draw
| -   
|      -
|        -
|           -
|             -
|               -
|                -
|                 -
|                  -
|                   -
|____________________

It confuses me if I start the rotation from 270 to 360 just to make the above drawing. Any ways you can suggest to ease my confusion? Also it is not logically right, right?

Here is the new test code I made.
glBegin(GL_TRIANGLE_FAN);
    glVertex2i(500, 400);
    for (int i = 360; i >= 270; --i)
    {
        int ax = (500 + cos(DEG_TO_RAD * i) * 100);
        int ay = (400 + sin(DEG_TO_RAD * i) * 100);
        glVertex2i(ax, -ay);
    }
glEnd();

A:

Well, the fact that (0, 0) is at the top-left of your screen makes positive X to the right (which is consistent with the usual math representations), but makes positive Y go downwards (which isn't consistent with the usual math representations). If you want to mimic the usual function drawing math's behavior, where a 0º-90º sphere quadrant lies at the top-right side, you could just invert the Y coordinate.
In other words, try:
verts.push_back(nY - (sin(DEG_TO_RAD * i) * nR));

