Results 1 to 3 of 3

Thread: How do you make a Circle?

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    London,ON,CA
    Posts
    3

    How do you make a Circle?

    AHHHHHH! lil help pls

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Lubbock, TX, USA
    Posts
    197

    Re: How do you make a Circle?

    float scale = 1.0;
    int step = 5;

    glBegin(GL_TRIANGLE_FAN);

    for(float ang=0; ang<360; ang+=step){
    x = cosf(ang*3.14f/180.0f) * scale;
    y = sinf(ang*3.14f/180.0f) * scale;
    glVertex3f(x, y, 0.0);
    }

    glEnd();

    adjust the values for scale and step to your needs

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2001
    Location
    London,ON,CA
    Posts
    3

    Re: How do you make a Circle?

    thank you so much

Similar Threads

  1. Make object circle a world every Y seconds
    By xorserq in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-26-2014, 12:22 PM
  2. Make sphere move in a circle
    By uberweiss in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-21-2010, 12:07 AM
  3. I want to make a circle
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-16-2002, 06:31 AM
  4. Easy way to make a circle?
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-12-2001, 05:40 PM
  5. how to make a nurb circle or cylinder?
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-24-2000, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean