title: How to compute normals for a segment line in 3D
body: <p>I have exported some hair particules from Blender (a hairstyle). These are composed of several lines (GL_LINES). My openGL program displays these particules without any problem. Now I just want to apply light properties on these particules. Blender does not export the normals vectors so I need to compute them by myself. I know the following rule :</p>
  
  <p>If we define a line segment as [AB] in two dimensions, 
  we have dx = xB - xA and dy = yB - yA, then the normals are N1(-dy, dx) and N2(dy, -dx).</p>
  
  <p>I hope I did not make any mistake.</p>
  
  <p>But I don't know the rule for a 3D space line segment definition if I add the z dimention in my line segment coordinates (for instance A(5, 2, 3) and B(0, 0, -5)).</p>
  
  <p>Does anyone can help me?</p>