Contouring in C

146
Contouring in C ATS 315

description

Contouring in C. ATS 315. How Contours Really Work. Contours may LOOK like curves, but they are really just straight line segments. How Contouring Works:. How Contouring Works:. How Contouring Works:. How Contouring Works:. How Contouring Works:. How Contouring Works:. - PowerPoint PPT Presentation

Transcript of Contouring in C

Page 1: Contouring in C

Contouring in C

ATS 315

Page 2: Contouring in C

How Contours Really Work

• Contours may LOOK like curves, but they are really just straight line segments.

Page 3: Contouring in C
Page 4: Contouring in C
Page 5: Contouring in C

How Contouring Works:

Page 6: Contouring in C

How Contouring Works:

Page 7: Contouring in C

How Contouring Works:

Page 8: Contouring in C

How Contouring Works:

Page 9: Contouring in C

How Contouring Works:

Page 10: Contouring in C

How Contouring Works:

Page 11: Contouring in C

How Contouring Works:

Page 12: Contouring in C

How Contouring Works:

Page 13: Contouring in C

How Contouring Works:

Page 14: Contouring in C

How Contouring Works:

Page 15: Contouring in C

How Contouring Works:

Page 16: Contouring in C

How Contouring Works:

Page 17: Contouring in C

How Contouring Works:

Page 18: Contouring in C

How Contouring Works:

Page 19: Contouring in C

How Contouring Works:

Page 20: Contouring in C

How Contouring Works:

Page 21: Contouring in C

How Contouring Works:

Page 22: Contouring in C

How Contouring Works:

Page 23: Contouring in C

How Contouring Works:

Page 24: Contouring in C

How Contouring Works:

Page 25: Contouring in C

How Contouring Works:

Page 26: Contouring in C

How Contouring Works:

Page 27: Contouring in C

How Contouring Works:

Page 28: Contouring in C

How Contouring Works:

Page 29: Contouring in C

So What We Are Really Worried About…

Page 30: Contouring in C

So What We Are Really Worried About…

Page 31: Contouring in C

So What We Are Really Worried About…

Page 32: Contouring in C

The northwest corner is grid[i][j].

grid[i][j]

Page 33: Contouring in C

The northwest corner is grid[i][j].

grid[i][j] grid[i][j+1]

grid[i+1][j] grid[i+1][j+1]

Page 34: Contouring in C

The northwest corner is grid[i][j].

grid[i][j] grid[i][j+1]

grid[i+1][j] grid[i+1][j+1]

Page 35: Contouring in C

How the contour is drawn depends on the value of the contour and the

values at the four corners!

grid[i][j] grid[i][j+1]

grid[i+1][j] grid[i+1][j+1]

Page 36: Contouring in C

For simplicity, rename the values at the corners:

nw ne

sw se

Page 37: Contouring in C

Count the number of corners with values greater than the contour

line.

nw ne

sw se

Page 38: Contouring in C

CornersGreaterThanContour can be 0, 1, 2, 3, or 4.

nw ne

sw se

Page 39: Contouring in C

if (CornersGreaterThanContour==0) do nothing

nw ne

sw se

Page 40: Contouring in C

if (CornersGreaterThanContour==4) do nothing

nw ne

sw se

Page 41: Contouring in C

if (CornersGreaterThanContour==1)… there are four possibilities:

nw ne

sw se

Page 42: Contouring in C

if (CornersGreaterThanContour==1)… there are four possibilities:

nw ne

sw se

Possibility 1: Only the northwest corner is greater than the value of the contour.

Page 43: Contouring in C

if (CornersGreaterThanContour==1)… there are four possibilities:

nw ne

sw se

Possibility 2: Only the northeast corner is greater than the value of the contour.

Page 44: Contouring in C

if (CornersGreaterThanContour==1)… there are four possibilities:

nw ne

sw se

Possibility 3: Only the southeast corner is greater than the value of the contour.

Page 45: Contouring in C

if (CornersGreaterThanContour==1)… there are four possibilities:

nw ne

sw se

Possibility 4: Only the southwest corner is greater than the value of the contour.

Page 46: Contouring in C

if (CornersGreaterThanContour==2)… there are three possibilities:

nw ne

sw se

Page 47: Contouring in C

if (CornersGreaterThanContour==2)… there are three possibilities:

nw ne

sw se

Possibility 1: The line should be drawn from the west edge to the east edge.

Either:

Both ne and nw are bigger than contour…

or

Both ne and nw are smaller than contour.

Page 48: Contouring in C

if (CornersGreaterThanContour==2)… there are three possibilities:

nw ne

sw se

Possibility 2: The line should be drawn from the north edge to the south edge.

Either:

Both ne and se are bigger than contour…

or

Both ne and se are smaller than contour.

Page 49: Contouring in C

if (CornersGreaterThanContour==2)… there are three possibilities:

nw ne

sw se

Possibility 3: Two contour lines pass through this box.

Either:

Both nw and se are bigger than contour…

or

Both nw and se are smaller than contour.

Page 50: Contouring in C

if (CornersGreaterThanContour==3)… there are four possibilities:

nw ne

sw se

Page 51: Contouring in C

if (CornersGreaterThanContour==3)… there are four possibilities:

nw ne

sw se

Possibility 1: Only the northwest corner is less than the value of the contour.

Page 52: Contouring in C

if (CornersGreaterThanContour==3)… there are four possibilities:

nw ne

sw se

Possibility 2: Only the northeast corner is less than the value of the contour.

Page 53: Contouring in C

if (CornersGreaterThanContour==3)… there are four possibilities:

nw ne

sw se

Possibility 3: Only the southeast corner is less than the value of the contour.

Page 54: Contouring in C

if (CornersGreaterThanContour==3)… there are four possibilities:

nw ne

sw se

Possibility 4: Only the southwest corner is less than the value of the contour.

Page 55: Contouring in C

What will this program look like?

Page 56: Contouring in C

What will this program look like?

/* Compute CornersGreaterThanContour */

if (CornersGreaterThanContour == 0) { }

if (CornersGreaterThanContour == 1) { }

if (CornersGreaterThanContour == 2) { }

if (CornersGreaterThanContour == 3) { }

if (CornersGreaterThanContour == 4) { }

Page 57: Contouring in C

What will this program look like?

/* Compute CornersGreaterThanContour */

if (CornersGreaterThanContour == 0) {

/* Do nothing */

}

if (CornersGreaterThanContour == 1) { }

if (CornersGreaterThanContour == 2) { }

if (CornersGreaterThanContour == 3) { }

if (CornersGreaterThanContour == 4) {

/* Do nothing */

}

Page 58: Contouring in C

What will this program look like?

if (CornersGreaterThanContour == 1) { }

if (CornersGreaterThanContour == 2) { }

if (CornersGreaterThanContour == 3) { }

Page 59: Contouring in C

What will this program look like?

if (CornersGreaterThanContour == 1) {

if( nw > contour) { }

if( ne > contour) { }

if( se > contour) { }

if( sw > contour) { }

}

if (CornersGreaterThanContour == 2) { }

if (CornersGreaterThanContour == 3) { }

Page 60: Contouring in C

What will this program look like?

if (CornersGreaterThanContour == 2) { }

if (CornersGreaterThanContour == 3) { }

Page 61: Contouring in C

What will this program look like?

if (CornersGreaterThanContour == 2) {

if( (ne > contour && nw > contour) ||

(ne < contour && nw < contour)) { }

if( (ne > contour && se > contour) ||

(ne < contour && se < contour)) { }

if( (nw > contour && se > contour) ||

(nw < contour && se < contour)) { }

}

if (CornersGreaterThanContour == 3) { }

Page 62: Contouring in C

What will this program look like?

if (CornersGreaterThanContour == 3) { }

Page 63: Contouring in C

What will this program look like?

if (CornersGreaterThanContour == 3) {

if( nw < contour) { }

if( ne < contour) { }

if( se < contour) { }

if( sw < contour) { }

}

Page 64: Contouring in C

Deciding how to draw the contour

nw ne

sw se

Let’s say that you have determined that this is the kind of line you need to draw.

This line segment has a starting point and an ending point.

Page 65: Contouring in C

Deciding how to draw the contour

nw ne

sw se

What determines the location of the starting point?

Page 66: Contouring in C

Deciding how to draw the contour

nw ne

sw se

What determines the location of the starting point?

INTERPOLATION!

Page 67: Contouring in C

Deciding how to draw the contour

nw ne

sw se

Suppose we are drawing the 1000 mb contour.

nw = 999.9

ne = 1022.1

Page 68: Contouring in C

Deciding how to draw the contour

nw ne

sw se

Suppose we are drawing the 1000 mb contour.

nw = 982.2

ne = 1001.1

Page 69: Contouring in C

Deciding how to draw the contour

nw ne

sw se

startlat = ???

startlon = ???

Page 70: Contouring in C

Deciding how to draw the contour

nw ne

sw se

startlat = depends on:•latitude of nw•latitude of ne•value at nw•value at ne•value of contour

startlon = depends on:•longitude of nw•longitude of ne•value at nw•value at ne•value of contour

Page 71: Contouring in C

Deciding how to draw the contour

nw ne

sw se

interp(gridlatitude[i][j], &startlat, gridlatitude[i][j+1], nw, contour, ne);

interp(gridlongitude[i][j], &startlon, gridlongitude[i][j+1], nw, contour, ne);

Page 72: Contouring in C

Deciding how to draw the contour

nw ne

sw se

How about the endlat and endlon?

Page 73: Contouring in C

Deciding how to draw the contour

nw ne

sw se

interp(gridlatitude[i][j+1], &endlat, gridlatitude[i+1][j+1], ne, contour, se);

interp(gridlongitude[i][j+1], &endlon, gridlongitude[i+1][j+1], ne, contour, se);

Page 74: Contouring in C

Deciding how to draw the contour

nw ne

sw se

Once you have (startlat, startlon) and (endlat, endlon):

1. tranform

2. clip

3. gline

Page 75: Contouring in C

How this produces contours

Page 76: Contouring in C

How this produces contours

Page 77: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 78: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 79: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 80: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 81: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 82: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 83: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 84: Contouring in C

How this produces contours

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 85: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 86: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 87: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 88: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 89: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 90: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 91: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 92: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 93: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 94: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 95: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 96: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 97: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 98: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 99: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 100: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 101: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 102: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 103: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 104: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 105: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 106: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 107: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 108: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 109: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 110: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 111: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 112: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 113: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 114: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 115: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 116: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 117: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 118: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 119: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 120: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 121: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 122: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 123: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 124: Contouring in C

for(contour=mincontour;contour<=maxcontour;contour=contour+conint)

i=0

i=1

i=2

i=3

j=0 j=1 j=2 j=3

Page 125: Contouring in C

Great, I can picture what this looks like, but how do I do it?

Page 126: Contouring in C

The Steps

• Open the window

• Draw the base map

• Read the sao.cty file

• Read the current_sao.wxp file

• Produce grids of objectively analyzed data.

• Contour (like this….)

Page 127: Contouring in C

for(i=0;i<NUMROWS-1;i++) {for(j=0;j<NUMCOLS-1;j++) {

for(contour=mincon;contour<=maxcon;contour=contour+conint) {

CornersGreaterThanContour = ?????;

if (CornersGreaterThanContour==0) { }if (CornersGreaterThanContour==1) { }if (CornersGreaterThanContour==2) { }if (CornersGreaterThanContour==3) { }if (CornersGreaterThanContour==4) { }

}

}}

Page 128: Contouring in C

for(i=0;i<NUMROWS-1;i++) {for(j=0;j<NUMCOLS-1;j++) {

for(contour=mincon;contour<=maxcon;contour=contour+conint) {

CornersGreaterThanContour = ?????;

if (CornersGreaterThanContour==0) { }if (CornersGreaterThanContour==1) { }if (CornersGreaterThanContour==2) { }if (CornersGreaterThanContour==3) { }if (CornersGreaterThanContour==4) { }

}

}}

For every “square” on the map…

(Notice that there are

(NUMROWS-1)x(NUMCOLS-1) squares…)

Page 129: Contouring in C

for(i=0;i<NUMROWS-1;i++) {for(j=0;j<NUMCOLS-1;j++) {

for(contour=mincon;contour<=maxcon;contour=contour+conint) {

CornersGreaterThanContour = ?????;

if (CornersGreaterThanContour==0) { }if (CornersGreaterThanContour==1) { }if (CornersGreaterThanContour==2) { }if (CornersGreaterThanContour==3) { }if (CornersGreaterThanContour==4) { }

}

}}

For every possible contour level…

(We’ll discuss how to figure this out shortly.)

Page 130: Contouring in C

for(i=0;i<NUMROWS-1;i++) {for(j=0;j<NUMCOLS-1;j++) {

for(contour=mincon;contour<=maxcon;contour=contour+conint) {

CornersGreaterThanContour = ?????;

if (CornersGreaterThanContour==0) { }if (CornersGreaterThanContour==1) { }if (CornersGreaterThanContour==2) { }if (CornersGreaterThanContour==3) { }if (CornersGreaterThanContour==4) { }

}

}}

Determine the number of corners on this square

that are greater than the current contour level.

(This will take about 5 lines of code.)

Page 131: Contouring in C

for(i=0;i<NUMROWS-1;i++) {for(j=0;j<NUMCOLS-1;j++) {

for(contour=mincon;contour<=maxcon;contour=contour+conint) {

CornersGreaterThanContour = ?????;

if (CornersGreaterThanContour==0) { }if (CornersGreaterThanContour==1) { }if (CornersGreaterThanContour==2) { }if (CornersGreaterThanContour==3) { }if (CornersGreaterThanContour==4) { }

}

}}

For each of the 5 possible values of

CornersGreaterThanContour, you’ll need the

elaborate “if” statements discussed earlier.

Page 132: Contouring in C

for(i=0;i<NUMROWS-1;i++) {for(j=0;j<NUMCOLS-1;j++) {

for(contour=mincon;contour<=maxcon;contour=contour+conint) {

CornersGreaterThanContour = ?????;

if (CornersGreaterThanContour==0) { }if (CornersGreaterThanContour==1) { }if (CornersGreaterThanContour==2) { }if (CornersGreaterThanContour==3) { }if (CornersGreaterThanContour==4) { }

}

}}

Where do you get these values?

mincon, maxcon, conint

Page 133: Contouring in C

mincon, maxcon, conint

• You could just prompt the user for these three values.

• Better: prompt the user for conint, and compute mincon and maxcon!

• But, to do this, you first need to be able to compute max and min of the grid!

Page 134: Contouring in C

max and min

• Suppose you have a 2D grid of floating point numbers.

• min needs to be the lowest value in the grid, and max needs to be the highest.

22.5 25.5 28.3

21.5 15.5 29.0

29.1 18.2 19.9

Page 135: Contouring in C

max and min

min = 100000000.;

max = -100000000.;

for(i=0;i<NUMROWS;i++) {

for(j=0;j<NUMCOLS;j++) {

if (grid[i][j] < min) min = grid[i][j];

if (grid[i][j] > max) max = grid[i][j];

}

}

22.5 25.5 28.3

21.5 15.5 29.0

29.1 18.2 19.9

Page 136: Contouring in C

max and minmin = 100000000.;max = -100000000.;

for(i=0;i<NUMROWS;i++) {for(j=0;j<NUMCOLS;j++) {

if (grid[i][j] < min) min = grid[i][j];if (grid[i][j] > max) max = grid[i][j];

}}

• Set min to a very high number and max to a very low number.

22.5 25.5 28.3

21.5 15.5 29.0

29.1 18.2 19.9

Page 137: Contouring in C

max and min

min = 100000000.;

max = -100000000.;

for(i=0;i<NUMROWS;i++) {

for(j=0;j<NUMCOLS;j++) {

if (grid[i][j] < min) min = grid[i][j];

if (grid[i][j] > max) max = grid[i][j;

}

}

• For every element of the 2D array…

22.5 25.5 28.3

21.5 15.5 29.0

29.1 18.2 19.9

Page 138: Contouring in C

max and min

min = 100000000.;

max = -100000000.;

for(i=0;i<NUMROWS;i++) {

for(j=0;j<NUMCOLS;j++) {

if (grid[i][j] < min) min = grid[i][j];

if (grid[i][j] > max) max = grid[i][j];

}

}

• If grid[i][j] < min, min=grid[i][j] !

22.5 25.5 28.3

21.5 15.5 29.0

29.1 18.2 19.9

Page 139: Contouring in C

max and min

min = 100000000.;

max = -100000000.;

for(i=0;i<NUMROWS;i++) {

for(j=0;j<NUMCOLS;j++) {

if (grid[i][j] < min) min = grid[i][j];

if (grid[i][j] > max) max = grid[i][j];

}

}

• If grid[i][j] > max, max=grid[i][j] !

22.5 25.5 28.3

21.5 15.5 29.0

29.1 18.2 19.9

Page 140: Contouring in C

But Sadly…

• min mincon

• max maxcon

Page 141: Contouring in C

But Happily…

• mincon = (float) (( (int)(min/conint) + 1) * conint)• maxcon = (float) (( (int)(max/conint) ) * conint)

You can work out the math and see that this works! (maxcon is easier than mincon)

Page 142: Contouring in C

Grading Assignment 15

• Properly determine mincon and maxcon from a grid of data, prompting the user for the contour interval.

Page 143: Contouring in C

Grading Assignment 15

• Correctly determining most of the things you need to draw contours, but not getting good output:

Page 144: Contouring in C

Grading Assignment 15

• Successfully contouring temperature fields:

Page 145: Contouring in C

Grading Assignment 15

• Successfully contouring any grid of data chosen by the user:

Page 146: Contouring in C

Suggested “Impressive” Things

• Variable domains

• Variable colors for the contours

• Nice labels for the plot (NOT contour labels!)