Application: Calculations and Graphics When the scripting world
Application: Calculations and Graphics When the scripting world had its first pre-release peeks at JavaScript (while Netscape was still calling the language LiveScript), the notion of creating interactive HTML-based calculators captured the imaginations of many page authors. Somewhere on the World Wide Web, you can find probably every kind of special-purpose calculation normally done by scientific calculators and personal computer programs leaving only weather-modeling calculations to the supercomputers of the world. In the search for my calculator gift to the JavaScript universe, I looked around for something more graphical. Numbers, by themselves, are pretty boring; so any way the math could be enlivened was fine by me. Having been an electronics hobbyist since I was a kid, I recalled the color-coding of electronic resistor components. The values of these gizmos aren t printed in plain numbers anywhere. You have to know the code and the meaning of the location of the colored bands to arrive at the value of each one. I thought that this calculator would be fun to play with, even if you don t know what a resistor is. The Calculation To give you an appreciation for the calculation that goes into determining a resistor s value, here is the way the system works. Three closely spaced color bands determine the resis tance value in ohms. The first (leftmost) band is the tens digit; the second (middle) band is the ones digit. Each color has a number from 0 through 9 assigned to it (black = 0, brown = 1, 53 CHAPTER …. In This Chapter Precached images Math calculations CGI-like image assembly ….
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.