(Page under development. Please email corrections or suggestion for this page to the author.)

NoPerspective shows the effect of using smooth (hyperbolic) interpolation versus using non-perspective interpolation. This shows rather dramatically the benefits of using hyperbolic interpolation.

This is part of a set of programs introducing the use of Modern OpenGL, which are intended to accompany a possible second edition of the book 3D Computer Graphics: A mathematical approach with OpenGL, Cambridge University Press, 2003. The book describes the mathematics of hyperbolic interpolation. For an early, succinct discussion of hyperbolic interpolation, see the article Hyperbolic Interpolation, in Jim Blinn's Corner published in 1992.

No perspective checkerboard Perspective checkerboard
Non-hyperbolic interpolation Hyperbolic interpolation

NoPerspective has one main source file, NoPerspective.cpp, plus shader programs in the source file NoPerspective.glsl. It uses the GlShaderMgr C++ package for for compiling and linking shaders and GlLinearMath software for handling the modelview and projection matrices.

Available for download:

Things to try out:

  1. Compile and run the program. Or run the executable. You will see a flat plane that is textured with a regular square pattern of black and white checkerboard squares. However, it is rendered in noperspective mode, that is, without hyperbolic interpolation, and looks very distorted.
    • Use the space bar, or 'P' or 'p' (perspective) toggle using perspective (hyperbolic) interpolation, and non-perspective interpolation. Note that the checkerboard is not rendered distorted when using hyperbolic interpolation.
    • Examine the source code to see how polygon offset is used to render the outlines of the two triangles that form the square without having a z-fighting. Try turning off the polygon offset and seeing how it affects the outlining of the two triangles.
    • Read the code documentation for more information.,

Version 0.1 of NoPerspective, February 28, 2020. Copyrights reserved.