shadowfax

10-25-2010, 04:39 AM

Hi,

I am using lighting for my project for which I have to define normals first. Its easy to define for cubes,as we know the direction already with glNormal(1,0,0)...etc But what should I do in case of Arcs, How should I approach for this?

Suppose I have rendered ring. For this I have constructed two curves on X-Y plane with one having radius more than other, and then again constructed two more curves with shifted Z distance. Then I joined these curves by GL_QUAD.

Now how should I generate normal vectors for these surfaces?

Thanks in advance.

I am using lighting for my project for which I have to define normals first. Its easy to define for cubes,as we know the direction already with glNormal(1,0,0)...etc But what should I do in case of Arcs, How should I approach for this?

Suppose I have rendered ring. For this I have constructed two curves on X-Y plane with one having radius more than other, and then again constructed two more curves with shifted Z distance. Then I joined these curves by GL_QUAD.

Now how should I generate normal vectors for these surfaces?

Thanks in advance.