Height Field Surface

Height Field Surface is a data analysis application which generates a 3D graph for a particular mathematics function. Using a technique called Graphics Rendering Height Plot, an application describes a relationship between lighting and material properties of a given point of a math function on a polygon based surface. Graph images are displayed in 2 different shading models:

  • flat shading
  • smooth shading in a unit cube

For this particular application, a displayed math function is
f(x,y) = 0.13 + 0.5(x^2+y^2)^2 + 0.18 sin(30x+30y) cos(10x-10y)

How do I get set up?

  • This program is written in C++ and OpenGL. Make sure you have OpenGL library installed.
  • Compilation process
    • Windows: compile and run in IDE
    • Mac:
      g++ -Wall -o yourfile yourfile.cpp -framework OpenGL - framework GLUT
    • Linux:
      g++ -g -o yourfile -I/usr/include/GL yourfile.cpp -lGL -lglut -lm -lGLU

Viet Trinh © 2013

alt tag alt tag alt tag alt tag