Results 1 to 3 of 3

Thread: Torus Trouble - more normal problems

  1. #1
    kevin
    Guest

    Torus Trouble - more normal problems

    hello,

    i have some code which draws a torus (or n degrees of it) by basically sweeping a circle around another one and joining up the sections as i go along.

    right... i need to calculate the vertex normals but i dont want to have to do it based on an average of face normals or anything like that. i know that if you have a sphere the vertex normal at any point is simply the same as the vertex itself ( if the middle of the sphere is at the origin) so i just want to know if there is a clever little trick i can use to calculate the normal at a particular vertex on a torus (drawn with the middle of the torus at the origin).

    any ideas?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: Torus Trouble - more normal problems

    -primary circle: represents the path for the...
    -secondary circle, wich rotates around.

    the normal to the vertex you are calculating can be easily obtained from the secondary circle.

    trace a ray from the secondary circle center (wich lies on th "path") to a vertex on the secondary circle (your torus vertex) and normalize.

    this should work...

    Dolo/\/\ightY
    Dolo/\/\ightY

  3. #3
    Member Newbie
    Join Date
    Mar 2000
    Location
    New Jersey
    Posts
    30

    Re: Torus Trouble - more normal problems

    Save yourself the trouble and use GL's automatic normal generation.

    fs http://fshana.tripod.com
    Francis Shanahan
    Architect

Similar Threads

  1. trouble calculating 'flat' normal
    By STTrife in forum OpenGL: GLSL
    Replies: 0
    Last Post: 06-02-2013, 04:24 AM
  2. Trouble with drawing torus
    By digitalshooter in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-01-2008, 08:59 PM
  3. Averaging normal vectors for TORUS
    By Bert De Craene in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 08-01-2006, 07:04 AM
  4. More normal problems
    By hooded paladin in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-14-2001, 05:51 AM
  5. Normal Generation Trouble.
    By MrShoe in forum OpenGL: Basic Coding
    Replies: 18
    Last Post: 06-18-2001, 05:37 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