Wednesday, June 17, 2009

Activity 1 - Digital Scanning
















Figure 1. Graph taken from Introduction to Physiological Chemistry by Meyer Bodansky, 1930.

In this activity, from the graph (Fig. 1) we found last meeting, we are to replicate it using Paint and Spreadsheet. From the pixel locations (x,y) of the points on the plot, we record it to the spreadsheet and perform scaling operations to the values to replicate the physical values found in the graph.

To scale the axis:
1. Take the x-pixel locations (x- if scaling the x axis, y- if scaling the y-axis) of the smallest value and largest value on the respective axis of the graph (i.e. 4.7 and 12.2).
2. Solve for the the average number of pixels in between grids:
pbg = (pixel location of max value on the axis - pixel location of min value on the axis)/[(max value -min value)/value increments]

For scaling on the x- axis:
physical value = min x value + x-pixel location* 0.5/pbg

For scaling on the y-axis:
physical value = max y value - y-pixel value*1/pbg
(Scaling on the y- axis is different from the x-axis since the origin (0,0) of the image is different from the origin of the Cartesian coordinate system.)

The numerical values on the above equations accounts for the physical value spacing between grids. Also note that pbg on x and y axis are not necessarily the same. The graph below is the superimpose plot of the original figure and the digitally scanned figure.

Figure 2. Superimposed plot of the original figure and the digitally scanned figure. It can be observed that the scanned figure fits the original one.

Th colored dots represent the digitally scanned points from the original graph. We can see that the points coincide with original one. I give myself 10 for doing a good job!

1 comment: