Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. float x0,y0;
  2. private void cerc(GL2 gl, float raza) {
  3. float x,y;
  4. gl.glBegin(GL2.GL_LINE_LOOP);
  5. for (float unghi = 0; unghi < 2* Math.PI; unghi += 0.1f) {
  6. x= x0 + raza * (float)Math.cos(unghi);
  7. y= y0 + raza * (float)Math.sin(unghi);
  8. gl.glColor3d(Math.random(), Math.random(), Math.random());
  9. gl.glVertex2f(x, y);
  10. }
  11. gl.glEnd();
  12. x0 += 0.005f;
  13. y0 += 0.001f;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement