Heights Applet update.


We have updated the heights applet for those of you that may want to use it in the project (or in the future). The new applet works exactly as it did before, with a couple of added features:

1.  Smoothing:
Now the applet has a smoothing spinner, set by default to 0 (no smoothing, as before). If you move the slider to a number larger than 0, you will see how the heights even out (with a very large number the surface will  become basically flat). The Smoothing is a bit similar to that used in the google ngram viewer   that we have shown as an example in the course.  As you may see in that example, the smoothing gets rid of "noise" (big differences in the samples) at the expense of detail. The more you smooth, the easier it is to see general trends, but the more difficult it is to see specific events. The smoothing, both in the Ngram Viewer and in our applet works by averaging the value of each sample point with those around it. One can select how many samples around are going to be used in the averaging (this is the number that appears in the smoothing spinner box). 

For the smoothing (http://en.wikipedia.org/wiki/Smoothing) the applet uses a formula for adding up and averaging the values of adjacent squares which is called a "Gaussian Convolution Filter"  . This is basically the same Gaussian Filter that you may have used in Photoshop, to reduce noise in images. What the smoothing spinner does is to specify the amount of neighbor  to each square cell that are going to be used to average values: 2, for example, means that it will average all the squares around each cell that are within 2 squares to the right and left and 2 squares up and down (2 square distance in x and y), using the gaussian formula.

If you do horizontal sections now (height curves or isolines, as they are also called) you will get much nicer looking curves also.

2. Frame:
By default the applet calculates the bounding box for the data (the smallest rectangle in which the data fits), and then it scales the grid accordingly. If one uses different sample data it may be difficult to compare them, since they will produce grids that are placed and scaled differently, even if they overlap . To solve this it is possible  now to have a layer called "FRAME" (or "frame", capitals don't matter ) that the program will use for making the bounding box. It will ignore otherwise the data in that layer (it won't count any polygon in the layer when calculating areas, for example), so don't put any data that you want to use on that layer! (see the examples included).

Here is the applet:
We have put some sample data with the "frame" layer on also:

The applets are also under the Applets column on the right.