Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int triangleAmount = 6;
  2. GLfloat twicePi = 2.0f * 3.14;
  3.  
  4. glBegin(GL_TRIANGLE_FAN);
  5. glVertex2f(x_1,y_1);
  6.  
  7. for(int i = 0; i <= triangleAmount; i++)
  8. {
  9. glVertex2f(
  10.     x_1+(6.0*cos(i*twicePi/triangleAmount))*4,
  11.     y_1+(6.0*sin(i*twicePi/triangleAmount))*4);
  12. }
  13. glEnd();
  14. glFlush();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement