link to main US Geological Survey website
link to Western Coastal and Marine Geology website
U.S. Geological Survey
Open-File Report 2005-1272
Version 1.0

Bedforms 4.0: MATLAB Code for Simulating Bedforms and Cross-Bedding

By David M. Rubin and Carissa L. Carter


two block diagrams of sediment with wave patterns on top surfaces

This MATLAB (©1994-2005 The MathWorks, Inc.) code mathematically simulates bedforms and cross-bedding. The bedform program can be used experimentally to create cross-bedding produced by bedforms with a known morphology and behavior or can be used by trial and error to recreate the morphology and behavior of bedforms that produced specific deposits. Examples of the modeling, comparison with real structures, and results of computer experiments are discussed by Rubin (1987) in Cross-Bedding, Bedforms, and Paleocurrents.

This documentation describes the use of the bedform program but assumes that the user is familiar with MATLAB. Included are five script files (M-Files) and one data file (MAT-File) necessary to run the program: NewDunes.m, DuneInit.m, DuneTopo.m, sandsurface.m, moviemaker.m, and sandpic5.mat. The user only needs to run NewDunes.m for full program functionality, but the other files must be in the same working directory or on the same MATLAB path. Input files that can be used to reproduce the illustrations published by Rubin (1987) are included and also need to be in the same working directory as the files listed above.

The bedform program is written in MATLAB. The program generates bedform topography, computes the x-y-z coordinates of the surface, and converts the three-dimensional coordinates of the simulated structures to the corresponding two-dimensional coordinates on the page, and covers the topography with a sandy surface. The program uses sine curves to create surfaces that approximate the shape of bedforms. Displacement of the sine curves simulates bedform migration, changing amplitude simulates changing bedform height, and combining sets of sine curves simulates superpositioning of bedforms. The equations that generate these mathematical surfaces can be inspected in the program source code, but such inspection is not necessary to run the program.

The program can be used to produce block diagrams that display vertical sections through cross-bedding, sandy surfaces of bedform topography, horizontal sections through the bedforms, and horizontal sections through the underlying strata. Sequences of images can be animated with QuickTime (©1991-2004 Apple Computer, Inc.) to illustrate bedform behavior.

Download this 13-page report as a PDF document This pdf file is the manual to run the MATLAB files included in the zipped file linked below (308 KB)

Download this, the MATLAB files in a zipped file .(2,4 MB)

For questions about the content of this report, contact Carissa Carter

Version history

Download a current version of Acrobat Reader for free

| Help | PDF help | Publications main page | Open-File Reports for 2005 |
| Privacy Statement | Disclaimer | Accessibility |
| Geologic Division | Coastal and Marine Geology Program |
This report is available only on the Web

| Department of the Interior | U.S. Geological Survey |
URL of this page:
Maintained by: Michael Diggles
Date created: August 17, 2005
Date last modified: October 5, 2006 (mfd)