Patent attributes
A method, an apparatus, and a computer program product are disclosed for rendering a digital image using raytracing in a three-dimensional space. A 3-D digital differential analyzer (DDA) denominator vector describes a size condition for stepping to a next cell. Variables of the denominator vector are setup for a first sample of a first horizontal line of samples. A ray is cast into the 3-D space for a current sample dependent upon the denominator vector. An updated value of the denominator vector for next sample is generated. First and second order differentials for the sample in the horizontal line of samples are incrementally computed using only additions. In this manner, a ray is cast for each sample in the line of samples. Another updated value for the denominator vector for next line of samples is generated. First and second order differentials for the vertical axis are incrementally computed using only additions. In this manner, every line of samples is processed.