Skip to content

A graphic program using C++ and OpenGL to produce and display a terrain mesh.

Notifications You must be signed in to change notification settings

Emilieczq/Terrain-3D-Modeling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terrain Modeling (OpenGl/GLUT)

This is a graphic program using C++ and OpenGL to produce and display an interactive terrain mesh.

Features

Instruction

Under the path of makefile, use the command make to start the program.

Commands Functions
LEFT/RIGHT rotate the 3D model about y axis
a/d rotate the 3D model about x axis
i print current rotation info
r generate a new random terrain using current heightmap algorithm
f toggle current algorithm between circle algorithm and fault algorithm, the default algorithm is circle algorithm
y draw the terrain using quads (strips)
t draw the terrain using triangles (strips)
w toggle wireframe mode between three options: 1. solid polygons; 2. wireframe; 3. both solid polygons and wireframe
l turn on/off lights
s toggle current shading between flat shading and Gouraud shading, the default shading is Gouraud shading
q/esc close the windows

Remarks

  • Unfortunately, the 2D overview is not synchronized immediately with the 3D model. Attention: To show sysnchronized 2D overview, you should select the small window (Windows) or press any key except q or esc (MacOS).

About

A graphic program using C++ and OpenGL to produce and display a terrain mesh.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published