OpenlGL Projects

Hey All I am going to sort all my OpenGL programs within the “OpenGL Projects” section.

Pretty clever, huh?

Obviously everything posted within this section is open source— why else would you care if it was OpenGL—All this goodness comes with the disclaimer that even thought I have done as much as I can to insure the quality of my programs I do not claim the programs won’t jump out and kill you or your friends, family and/or your computer…

If this does happen—I’m terribly sorry…

Since I do use DirectX as a front-end for games occassionally, I’m electing to keep them seperated since some people might have a preference for one and not hte other. So if DirectX is your cup of tea—this isn’t the section for you.

Simple Landscape

This demo just randomly creates terrian and with a gently tide. To build this terrain I use various intersection and circle iteration methods.

Simple Landscape

Basic Intersection Idea:

  • Draw a line across the terrain so it is split into two halves.
  • Now raise one half and lower the other half.
  • Do this 1000 times and you’ll get a jagged surface.

Basic Circle Method:

  • Pick a point and a radius on the terrain.
  • Raise the terrain out in a bubble shape to match its radius
  • Do this 100 times and you’ll get a nice mountain

Now you want to smooth out the terrain to give it a realistic feel. Just remember that this isn’t suitable, as it stands, for any games. For a game you might want not want to process height data on the fly (use a hightmap instead).

Downloads

Click here for a other articles in the opengl section.

Posted on Apr 2, 08:14 PM by Walter Reid

Add Your Comment

You may use textile in your comment.