Thanks for your post.

I’m especially interested in your angle dependent normal calculation. I’ll give it a try.

I can’t understand why my version has alternating bands of light and dark. Here is the code summary:

I used a single triangle strip to draw the graph (with a switch-back for every new line of data). Normals were calculated by creating vectors from 3 consecutive vertices and taking the cross product.

//Get First vertex of triangle

FirstPoint = pVertex->GetAt(pIndex->GetAt(nTrueOffset + nCtr));

//Get second vertex of triangle

SecondPoint = pVertex->GetAt(pIndex->GetAt(nTrueOffset +nCtr+1));

//Get third vertex of triangle

ThirdPoint = pVertex->GetAt(pIndex->GetAt(nTrueOffset +nCtr+2));

///////////////////////////////////

// Create two vectors in triangle //

////////////////////////////////////

//Get first vector of triangle

FirstVector = FirstPoint -SecondPoint;

//Get second vector of triangle

SecondVector = ThirdPoint -SecondPoint;

/////////////////////////////////////////

// Make normal of triangle from vectors //

//////////////////////////////////////////

NormalVector = SecondVector*FirstVector;

//make normal a unit vector

NormalVector = NormalVector.Normalise();

Smoothing was done by averaging each set of three vertices specified by the index array (the average of all connected triangle normals).