Recursive Ray Acoustics (RRA) Sonar Algorithm

Java-VRML Implementation

Don Brutzman, Naval Postgraduate School,

Project Overview | Distribution & Documentation | Examples | References | Sponsorship

Project Overview

This project calculates and renders physically realistic sonar beams in real time. Java programs are used for sonar ray-tracing computation and the Virtual Reality Modeling Language (VRML 97) is used for 3D graphics.

The primary motivation for this project is to produce underwater sonar beams for analytic and visualization use in virtual worlds. Virtual world simulations are realistic when individual components are simulated in a manner that reflects reality. For an underwater virtual world that includes simulated acoustic detection, a physically based sonar propagation model is required if ranges in excess of tens of meters are expected. The Recursive Ray Acoustics (RRA) Algorithm by Dr. Lawrence Ziomek of NPS provides a general & rapid ray-tracing algorithm which can accurately & quickly predict sonar propagation through seawater, under a wide variety of surface, water-column and ocean-bottom environmental conditions.

This project creates an application programming interface (API) for real-time 3D computation and visualization of acoustic energy propagation. The API provides features for generating complex physically based sonar information at interaction rates, and then visualizing that acoustic information. The simulation is programmed in Java, and runs either as a stand-alone program or as a script in a web browser. This program generates Virtual Reality Modeling Language (VRML 97) compliant code that can be viewed from any VRML-capable Web browser. This approach allows the characteristics of the energy propagation to be calculated with high precision and observed in three dimensions (3D) and in real time.

As sonar-system information bandwidth becomes larger, more intuitive ways of presenting information to users are required. Interactive 3D graphics with environmental and entity rendering can free users from mentally integrating complex data piecemeal. This approach can enable significantly greater understanding and quicker reaction times. We are optimistic that this API might someday provide the foundation for fundamental advances in sonar modeling and visualization.

RRA Software Distribution & Package Documentation

The RRA software, model and documentation library was last updated 20 September 1999. Confirmation of build date/time is in file

The software library is available in two forms: rra.tar.gz and

A Makefile is used to produce the rra distribution. See the text file make_rra.out for a log of success, warning & error messages generated during this build. Autogenerated VRML file warnings are also available at filelist.vorlon.warnings.out.

The RRA Package Documentation is produced by Javadoc from the API source code. It describes rra model classes and example applications in the RRA package library.

The References section on this page includes links to Tim Holliday's thesis and summary powerpoint presentation.


Here are a few simple visualization examples. We have chosen a single but challenging sonar geometry to demonstrate a variety of visualization techniques.

Each ping starts at the surface and points down towards an upward-sloping bottom. Each ping reflects between shallow bottom and water surface several times before returning dowards deep geometry. Refraction (bending) and energy absorption occurs throughout the ping trajectory, due to continuous changes in sound speed profile (SSP) plus reflections at bottom and surface.

The great variety of displayed information in the following examples hint at the visualization possibilities possible using this approach. A great deal of follow-on work is planned.

Sonar primitives These examples show a variety of RRA sonar primitives. The ping geometry geometry is complex but remains identical each time.

original 10KB
compressed 2KB

ExampleRay ExampleRay shows a single Ray.

ExampleRay.m is a Matlab version of this same program which identically accesses the Java RRA library. The output scene ExampleRay.matlab.wrl similarly shows a single Ray.

Directions on how to configure Matlab to use Java are adapted from Matlab's help java page and are available (with detailed corrections) in MatlabHelpJava.txt.


original 68KB
compressed 11KB

ExampleBeamStatic ExampleBeamStatic shows the volume traced out by a 4-ray Beam.

original 63KB
compressed 10KB

ExampleBeamDynamic ExampleBeamDynamic shows the dynamic wavefront produced by a 4-ray Beam.

original 451KB
compressed 60KB

ExampleLobeStatic ExampleLobeStatic shows the volume traced out by Lobe consisting of four 4-ray Beams.

original 56KB
compressed 16KB

ExampleLobeDynamic ExampleLobeDynamic shows the dynamic wavefront produced by a Lobe consisting of four 4-ray Beams.
Visualization schemes Several visualization schemes are presented here. In each case they are applied to identical static lobe (multiple-beam) sonar volumes.

These examples map various combinations of [transmission loss (dB) or propagation time] versus [linear-RGB color or intensity]. The second viewpoint in each scene includes the color-intensity legend shown in the thumbnail images.


original 446KB
compressed 59KB

ExampleLobeStatic1 ExampleLobeStatic1 maps propagation time to color.

original 441KB
compressed 62KB

ExampleLobeStatic2 ExampleLobeStatic2 maps transmission loss to color.

original 450KB
compressed 60KB

ExampleLobeStatic3 ExampleLobeStatic3 maps transmission loss to color, and propagation time to intensity

original 451KB
compressed 60KB

ExampleLobeStatic4 ExampleLobeStatic4 maps propagation time to color, and transmission loss to intensity

original 413KB
compressed 59KB

ExampleLobeStatic5 ExampleLobeStatic5 maps detection/counterdetection ranges to color, and propagation time to intensity.

original 413KB
compressed 61KB

ExampleLobeStatic6 ExampleLobeStatic6 maps detection/counterdetection ranges to color, and transmission loss to intensity.

original 412KB
compressed 60KB

ExampleLobeStatic7 ExampleLobeStatic7 maps monochrome-red transmission loss to intensity.


Holliday, Timothy, Real-Time 3D Sonar Modeling and Visualization, Master's Thesis, Naval Postgraduate School, Monterey California, June 1998. Available at HollidayRRAthesis.pdf. Slideset available in Powerpoint and Acrobat .pdf formats.

Ziomek, Lawrence, "The RRA Algorithm: Recursive Ray Acoustics for Three-Dimensional Speeds of Sound," IEEE Journal of Oceanic Engineering, vol. 18 no. 1, January 1993.

Ziomek, Lawrence, Fundamentals of Acoustic Field Theory and Space-Time Signal Processing, First Edition, CRC Press, Boca Raton Florida, 1995.


The RRA work is currently unfunded but remains in use for student projects. Significant additional development is possible. Please contact Don Brutzman if you are interested in research sponsorship opportunities.

Students in our research team at NPS are carrying out a variety of related work on large-scale networked software architectures. Topics include implementation of the Distributed Interactive Simulation (DIS) Protocol dis-java-vrml, dial-a-behavior protocol (DABP), area-of-interest management (AOIM) and the virtual reality transfer protocol (vrtp).

1 November 2003 (official NPS disclaimer)