I'm trying to do a Sphere through revolve. I creating a slice of points from 90 to -90 and revolve around an axis resulting in creating N number of slice through a rotation.
Then I join the slices by taking 4 points each time from a two slice. Example
Point 1 = SLICE[ SLICE\_LOOP ][ VERTEX\_LOOP ] ;
Point 2 = SLICE[ SLICE\_LOOP ][ VERTEX\_LOOP+ 1 ];
Point 3 = SLICE[ SLICE\_LOOP + 1 ][ VERTEX\_LOOP ]
Point 4 = SLICE[ SLICE\_LOOP + 1 ][ VERTEX\_LOOP + 1 ];
Using the 4 points I create two triangles with anticlockwise winding rule. The Sphere is created correctly except
"at the VERTEX_LOOP = 0 where the winding rule is clockwise as the Normal is facing inside of the sphere. This only happens for only one of the triangles. The other triangle is created with anticlokwise.
All the other triangles the normals are facing outside the sphere."
I notice when the distance between tip is closed , the normal becomes clockwise.
My question is this cause by Maths rounding off when calculating Normals? I'm using java. Has anybody face this problem before ? And how do I solve this.