Drawing a red circle with cuda and openGL

I am very new to cuda and dont have long to figure this out

__global__ void d_render(uchar4* d_output, uint width, uint height) {

    uint x = blockIdx.x * blockDim.x + threadIdx.x; 
    uint y = blockIdx.y * blockDim.y + threadIdx.y; 
    uint i = y * width + x;

    float u = x / (float)width;
    float v = y / (float)width;

    u = 2.0 * u - 1.0; 
    v = -(2.0 * v - 1.0);

    if ((x < width) && (y < height)) {
        d_output[i] = make_uchar4(0, 0, 0, 0);

I have the code above which creates a plain black image, how would I, using the u and v pixel coordinates, draw a large red circle in the center of the image? Thank you so much in advance

I don’t really want to do your homework for you, but I suspect the problem could be solved using the formula for a circle:

x2 + y2 = r2

You would test if your x and y coordinates satisfied that (suitably offset, and with some tolerance) and if so you would do a make_uchar4 of some other color.