Following are explanations of each of the six M-files that make up the landscape builder, along with links to the source code.
Landscape.m is the M-file called to get the program running. In addition to initializing all of the attributes of the landscape (such as size, method used, etc.), it sets up the two viewing windows and the additional menu.

Build.m does the brunt of the work. It takes as arguments all of the desired attributes of the landscape, and uses the specified method to create a height field. It then sets up the appropriate color map and uses surf() to plot the landscape surface.

ChangeOptions.m is used when a new method is chosen from the method menu. It resets the characteristics of the landscape so that they're appropriate for the method chosen. In addition, it checks the option chosen under the method menu.

BuildCustomized.m is called when the user is done setting attributes in the customizing window. It interprets the chosen attributes and converts them to corresponding parameters, and then calls Build with these parameters.

FillWithWater.m is called when the calculated height field has negative heights. It then changes all of the negative heights to zero. In effect, this "fills" all of the valleys bellow sea level with water.

Odd.m simply takes a parameter x and returns TRUE if x is odd, FALSE if x is even.