Click here to Skip to main content
15,741,818 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
please Explain that how to create circle
how to use funcations
#include <Windows.h>
#include <GL\glew.h>
#include <GL\freeglut.h>
#include <iostream>

using namespace std;

void init(void)
	glClearColor(0.0, 0.0, 1.0, 0.0);
	gluOrtho2D(0.0, 300.0, 0.0, 170.0);


void DrawSnowman(void)

	glColor3f(1.0, 1.0, 1.0);

	glTranslatef(70, 100, 3.00);
	glutSolidSphere(12.0, 30, 50);


void main(int argc, char** argv)
	glutInit(&argc, argv);

	glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
	glutInitWindowPosition(0, 0);
	glutInitWindowSize(1366, 768);

What I have tried:

i am tried but not fill the color in the circle
this is code
Updated 9-Mar-18 6:47am
CPallini 8-Mar-18 7:32am    
Sorry, what circle?

1 solution

Your question is really not clear. If I understand you correctly, you can make a circle (assuming you mean the two dimensional shape) from a solid sphere by setting the z scaling factor to zero (1,1,0) and that should flatten the sphere and make it into a circle.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900