Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int triangleAmount = 6;
- GLfloat twicePi = 2.0f * 3.14;
- glBegin(GL_TRIANGLE_FAN);
- glVertex2f(x_1,y_1);
- for(int i = 0; i <= triangleAmount; i++)
- {
- glVertex2f(
- x_1+(6.0*cos(i*twicePi/triangleAmount))*4,
- y_1+(6.0*sin(i*twicePi/triangleAmount))*4);
- }
- glEnd();
- glFlush();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement