Moving around a world.

Does anyone have any code for moving around a world? It is not as simple as Rotatef and Translatef, for obvious reasons. It would probably require some trigonometry, but I cant seem to get my code to work, so Im looking for a somple frogram that lets me walk around say a polygon.

See in the tutorials section, there is one about creating a basic 3D engine displaying a 3D world