DocumentCode
1018239
Title
Three wrongs make a right
Author
Blinn, James F.
Author_Institution
California Inst. of Technol., Pasadena, CA, USA
Volume
15
Issue
6
fYear
1995
fDate
11/1/1995 12:00:00 AM
Firstpage
90
Lastpage
93
Abstract
When dealing with graphics operations that must be fast (like the inner loops of rendering algorithms), I usually like to do calculations with fixed-point arithmetic (that is, scaled integers) rather than floating point arithmetic. The exact scaling factor used can have some interesting effects on the speed and errors in the calculation. In this article, I´ll give some titbits I´ve discovered or picked up from others about this. In particular, I´ll talk about some of the advantages of using odd numbers of the form 2n-1 as scaling factors. The motivation for this discussion is the desire to do arithmetic on pixel values: red, green, blue, or alpha. These values are in the range 0...1, so all numbers you see here are positive. In the discussion that follows, I´ll use floating point as a testbed and as scaffolding to derive integer formulas. All final calculations take place using only integer arithmetic
Keywords
computer graphics; digital arithmetic; exact scaling factor; fixed-point arithmetic; floating point arithmetic; graphics operations; integer formulas; rendering algorithms; scaled integers; Equations; Filling; Filtering; Fixed-point arithmetic; Floating-point arithmetic; Graphics; Rendering (computer graphics); Signal generators; Testing; Turning;
fLanguage
English
Journal_Title
Computer Graphics and Applications, IEEE
Publisher
ieee
ISSN
0272-1716
Type
jour
DOI
10.1109/38.469535
Filename
469535
Link To Document