Results 1 to 6 of 6

Thread: Cylinder / Sphere mesh generation

  1. #1
    Guest

    Cylinder / Sphere mesh generation

    Does anyone know of source code to place cylinders and spheres of radius R at specified coordinates [(X,Y,Z) for spheres and (X1,Y1,Z1,X2,Y2,Z2) for cylinders]?

    I don't want to use the glu routines, since I need different textures at various points on the objects.

    I guess constructing them using triangle meshes would be best, but the working out vector math is beyond me.

    Many thanks,

    Rich Gilbert

  2. #2
    Member Contributor
    Join Date
    Jul 2001
    Location
    South Africa
    Posts
    52

    Re: Cylinder / Sphere mesh generation

    hmmm this might not help at all, but have you looked into quadratics(sp?) ?

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Cylinder / Sphere mesh generation

    I have some old c source that does this. Give me your email and I'll mail it to you. Also check out the FAQ for comp.graphics.algorithms

  4. #4
    Guest

    Re: Cylinder / Sphere mesh generation

    Fantastic - that'll save a lot of time.

    Thanks very much.

    e-mail: r.gilbert@ic.ac.uk

  5. #5
    Junior Member Newbie
    Join Date
    Oct 2001
    Posts
    3

    Re: Cylinder / Sphere mesh generation

    Originally posted by harsman:
    I have some old c source that does this. Give me your email and I'll mail it to you. Also check out the FAQ for comp.graphics.algorithms

    Can you mail me codes to Draw Circle, Cone, and Cylinder using quads?

  6. #6
    Senior Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: Cylinder / Sphere mesh generation

    I'll mail you code to draw cylinders, you should be able to hack that to get cones (just replace the circle at one end of the cylinder with a single vertex) and disks/circles.

Similar Threads

  1. tiff to 3d mesh generation.
    By Hurricane_RusH in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-04-2018, 11:14 PM
  2. Mesh generation for Cube, Sphere etc with Vertices, UV's Normals, Tangent & Bitangent
    By imported_paul_g_griffiths in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 01-21-2017, 08:22 AM
  3. Sphere, cylinder, cone and torus
    By jvachez in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-21-2003, 09:09 AM
  4. How to map a textured image to sphere or cylinder
    By anngo in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 08-13-2001, 11:33 PM
  5. sphere and cylinder
    By eckiller in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 05-20-2000, 08:45 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