Three-dimensional imaging algorithms