A tank running on a height field

Hi,
I’m an OpenGl beginner and I’m building a tank game based on DogFight 0.8.4 (infernus.net domain name is for sale. Inquire now.). The main diference is that each tank (or ship) is controlled by a win32 executable. So, in order to play the game, you have to code the brain (A.I.) of your tank. It was inspired on PC-Robots and AT-Robots (http://tpga.virtualave.net/game-links.htm ).
Now, I’d like to contruct 3D grounds (a random heightfield, for example). The problem is, how to do a tank (or ship) run over a ground with a lot of different inclinations? Is there any game source-code, or even a game/3D engine which would help me in doing this?

Thank you

Take the polygon that is directly beneath your tank and calculate it’s normal. That is the normal for the ground plane of the tank as well. Then, when you move from one polygon to another you need to interpolate accordingly to not let it look weird. You could just do a weighted sum and then normalizing.