Results 1 to 2 of 2

Thread: View diection / surface normal

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2009

    View diection / surface normal


    had this equation to program but do not know what some of the parameters meant.
    cdot(e) = (1+V.N)/2
    This formula is a=for an edge(e)

    What does this line mean?
    the orientation of its surface normal (~N) with respect to the view direction (~V)
    In programming, how do I get the V and the N for each edge of an object.

    Thanks for the help.
    Fyi, I do noe have in-depth knowledge on vectors/ 3D stuff.

  2. #2
    Junior Member Newbie
    Join Date
    Jan 2010

    Re: View diection / surface normal

    what I can tell you is that:

    V.N is the dot product of two vectors V & N (View prob stands for Vertex, N for Normal).
    The dot product is the cos of the angle between the two vectors. look up on wikipedia or something.

    The formula wants these two vectors as unit vectors(their length = 1.0). When you take the dot product of two unit vectors the result will lie between the range of -1.0 and 1.0.

    The formula (1 + V.N)/2 is to bring this end result into a range of 0.0 to 1.0.

Similar Threads

  1. have problem to calc normal to surface
    By lonibabi in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-13-2013, 05:06 PM
  2. Surface Normal Function - Not really sure...
    By MightyLampshade in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 11-17-2010, 01:40 PM
  3. How to rotate a surface so it has a given normal?
    By Tavio in forum OpenGL: General
    Replies: 2
    Last Post: 09-23-2009, 08:32 PM
  4. determining surface normal
    By akashiraffee in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-05-2009, 02:10 PM
  5. Normal to a surface
    By dmantamp in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-09-2004, 09:07 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