In the early days of computing, scientists might be able to get by examining pages of data. A rough computation using
10 numbers/row (line printer page that's 132 colums wide)
40 rows/page (with heading and such)
50 pages
----------------
20,000 numbers
Each number uses a word of storage, therefore on a computer such as the Cray with its 64 bit (8 Byte) wordsize, these 50 pages corresponds to roughly
Recall the exercise we did on the board in Lab on Monday:
1 byte = 8 bits 1 MATLAB Character uses 2 bytes 1 word = ______ bits (32 on Rohan) _____ MATLAB characters = 1 word (2 on Rohan)
Even this old fashioned way of examining data resulted in a person having to "digest" (interpret?) 1/5 MB of data. [Watch out when people start abbreviating quantities, MB = MegaBytes; Mb = MegaBits; and since 1 byte = 8 bits, there's another rough order of magnitude.]
With the overwhelming amount of data that can be generated by computed model or measured with fine precision instruments, graphics became a necessary mechanism to represent large data sets.
Graphics can be displayed on a computer terminal or on a hard copy device.
On a computer terminal, the resolution possible is measured in "pixel"s. Typical resolutions are 800 by 600 pixels and much high resolutions are possible on the more expensive devices (1280 by 1024, say). Each pixel can be either on or off for a monochrone monitor; or display a color which can range from 256 colors [requiring 8 bits (2^8=256) to present the color code for each pixel] to 1,6777,216 colors [requiring 24 bits (2^24) to represent the color code of each pixel].
Hard copy devices, such as pen plotters, also are concerned with resolution. A pen plotter can only "connect the dots", but it can do this with an assortment of "pens". If you were to look at the very lowest level of control of a pen plotter, you'll see that there is only a small set of commands:
Pen Up
Pen Down
Move from (x,y) to (u,v)
Pick up Pen
Return Pen
In both cases, producing a graph is a "discrete process". The pen plotter only has a finite number of possible colored pens available. A computer terminal can only display a finite number of colors. If the scientists generates MANY points, then connecting the dots will produce a smooth curve. Producing (and storing) this large amount of data may be prohibitively expensive. If each data point is the result of running an experiment in the lab then obtaining the data is likely to be costly. If each data point is the result of a computer model, then the cost of the computer time as well as the computer storage storage must be considered.
Producing a simple, 2 dimensional plot involves:
When only a sample of data is available, then numerical techniques such as Section 2.2 XY Plots can be used to produce enough intermediate data to make a smooth plot. This is a topic that is pursued in other courses, Math 541 Introduction to Numerical Computing would be a good place to learn the details. For the purposes of this course, we fill focus on producing the plots within MATLAB and not with some of the details of how they are produced. Our text also presents an introduction to Interpolation and Curve Fitting in Chapter 6, but we will use this only as another example of Data and Graphs to represent this data.
Scientific Visualization goes beyond graphics in the sense that "visual queues" such as color and texture are used to quickly transmit a meaning to the viewer from a plot. This becomes critical when generating 3D graphics since there is typically a lot of information to be portrayed on a finite surface. A simple example would be when displaying data corresponding to temperatures. A "color palette" is used to associate a particular data value with a color to be displayed on the screen. Red would naturally correspond to "hot" or high temperatures and blue would naturally correspond to "cold" or low temperatures. All values in between would be represented as a smooth transition from red to blue. This color would then be used to "light" the pixel corresponding to the coordinates of the data point.
Both the computer terminal and a pen plotter are 2D and therefore represent a "projection" or a "slice" of the 3D object. Working dynamically at a computer monitor would allow the user to rotate the object to gain a better understanding of the structure, but this requires a lot of computing power.
We will focus first on 2D graphics, which is the basic building block.