#include <iostream>
#include <stdio.h>
#include <GL/glut.h>
#include <windows.h>
#include <math.h>
using namespace std;
void display(void) {
float cx = 200, cy = 200, rad = 50;
float startx = cx - rad;
float starty = cy;
int x = startx, y = starty;
glColor3f(1.0f, 0.0f, 0.0f);
glBegin(GL_POINTS);
glVertex2f((x - 250.f) / 250.f, (250.f - y) / 250.f);
while (x < cx + rad) {
x++;
y = cy - sqrt(rad * rad - (x - cx) * (x - cx)); …Run Code Online (Sandbox Code Playgroud)