# The Industry's Foundation for High Performance Graphics

#### from games to virtual reality, mobile phones to supercomputers

I am using C++ and am looking to the future. I plan to have each two triangles making up a quad class in a world of quads. For now, I am not considering the best ways to render the triangles. I am using the new OpenGL. Each of these two triangles will share the same angled face. As I am understanding, now, the physics will work well with linear interpolation that will allow a ball to be placed correctly anywhere on the combined faces. However, I would like to make the faces of each quad curved, or smoothed, or averaged with there neighbors, not angular. I believe this is called splining. So, how can I easily draw curves between faces instead of angles? If they can be drawn with an (easy) spline method, I believe related calculations can be made to place an object anywhere on them!

Thank you so much for your help,

Josheir

2. for smooth shading of say a ball, you dont need any splines, instead vertex normals interpolated over the face (triangle, quad, whatever) can be used ...

3. John_connor, I researched what you suggested and I'm uncertain If I am communicating correctly. What I'm saying is if the faces of the quads are angled steeply where they meet than it would be very angular. I would like it to look more like a curved hump. It seems to me that this would need more than just smooth shading, or am I wrong?

Thanks again,

Josheir

4. ## Attachment to Explain.

I have attached a drawing. It's the edge of three faces (they aren't little). Does smooth shading make the blue angles become the red curve? What if it were made up of only two blue edges?

Thank you!

Josheir

Edit: All edges are same size.

5. Originally Posted by Josheir
I have attached a drawing. It's the edge of three faces (they aren't little). Does smooth shading make the blue angles become the red curve?
No, it just makes it harder for the eye to tell the difference. See the images at the top of this page for an example. It won't affect the object's silhouette, though.

Ultimately, the hardware renders triangles. Smooth surfaces are usually implemented using a piecewise-linear approximation, with the number of subdivisions determined by a combination of what's acceptable and what the hardware can handle at a reasonable speed. This can be done in the application or (possibly) in the hardware.

Legacy (1.x) OpenGL supports Bézier curves and patches via what it terms evaluators. The GLU library uses these to implement NURBS curves and surfaces. These typically aren't implemented in hardware.

This feature isn't supported in modern OpenGL (3.1+ core profile). However, OpenGL 4.0+ supports a more general mechanism via tessellation shaders.