turnin
: cs444_assignment_9
In this assignment, you will implement Marching Squares, one algorithm for generating contours of a 2D scalar field. We will use the same data as in assignment 6, the dataset with temperature and pressure measurements for a simulation of Hurricane Isabel. As usual, you will build on skeleton code we provide.
The data is provided in two arrays: temperatureCells
and
pressureCells
. Each array contains objects that look like this:
{
NW: value-at-nw-corner,
NE: value-at-ne-corner,
SW: value-at-sw-corner,
SE: value-at-se-corner,
Row: i,
Col: j
}
Implement the computation of outline contours using marching squares
by filling out the skeleton code, specifically the function
generateOutlineContour
. As in assignment 6, each square is 10x10
pixels.
The solution will look like this:
Implement the computation of filled contours using marching
squares by filling out the skeleton code, specifically the functions
generateFilledContour
and includesFilledContour
. As in assignment
6, each square is 10x10 pixels.
The solution will look somewhat like this: