Results 1 to 2 of 2

Thread: How do you make a Cylinder??

  1. #1
    Guest

    How do you make a Cylinder??

    I need to make a cylinder does anyone
    have any ideas??

    thanks

    Greg

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Italy
    Posts
    124

    Re: How do you make a Cylinder??

    Two ways:
    - using glut (quadrics)
    - doing math

    You can do the two circles with a triangle fan, describing the points on the xz plane in this way:
    x=ray*cos(theta)
    z=ray*sin(theta)
    where theta is (current slice)*360/(number of slices).
    The y coord depends by the height and the 'offset' form the origin.
    The side faces can be done with quad or tri strips using the points already calculated.
    The normals... well there you need more math.
    bye!
    tFz

Similar Threads

  1. How to make a cylinder using OpenGL in VB.NET ?
    By the_rising in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-20-2005, 04:30 AM
  2. how to make a line look like a cylinder?
    By jyoung77 in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 10-13-2003, 01:58 PM
  3. Replies: 2
    Last Post: 09-13-2001, 04:28 AM
  4. 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