Skip to content

ctsilva/raytrace

Repository files navigation

Ray Casting of Irregular Grids

Implementation of the ray casting algorithm for irregular tetrahedral grids as described in:

Paul Bunyk, Arie E. Kaufman, Cláudio T. Silva.
"Simple, Fast, and Robust Ray Casting of Irregular Grids"
Scientific Visualization 1997: 30-36

Overview

This software performs direct volume rendering of unstructured tetrahedral meshes using an efficient ray casting technique. The algorithm works by tracing rays through an irregular grid to visualize scalar field data stored at the vertices of a tetrahedral mesh.

Features

  • Ray casting through irregular tetrahedral grids
  • Direct volume rendering with opacity-based compositing
  • Support for transfer functions (mapping data values to color and opacity)
  • Boundary detection and visibility determination
  • Camera rotation support for multiple frame generation
  • Output in PPM image format

Building

The project uses CMake for building:

mkdir build
cd build
cmake ..
make

Alternatively, use the provided Makefile directly:

make

Usage

./raytrace [input_file] [options]

The input file should be in TOFF format containing tetrahedral mesh data.

Implementation Details

The implementation uses several key components:

  • Tetrahedral cell representation with interpolation capabilities
  • View plane management for ray generation
  • Optimized triangle intersection testing
  • Spatial data structures for acceleration
  • Transfer function support for mapping scalar values to visual properties

License

This code is provided as a reference implementation of the algorithm described in the paper.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors