## Midterm Exam 1 Review Fall 2003: Which does which

(Back to Fall2003 Midterm Review 1)

Guess I'll start the ball ball rolling here. Would the answer to this one be D? A just sets the blue of every pixel to 100, while B makes pixels with no blue have a blue of 100. C would remove blue of pixels with REMOVED then 100 blue, but it would also do the same to some with less then 100 blue, depending on the R and G values, since they're part of the distance formula. D looks only at blue and clears blue from the pixel.

 To begin, look at part A again - what do x and y mean when you are talking about pictures? There are two "for" loops there that are both doing something. Lauren Biddle

REMOVED, right. In this thing, it's specifying a range of 1 to 100 for the x and y coordinates, so the only pixels being affected are from (1,1) to (100,100).
 So then A will create a diagonal line of pixels with a blue value of 100 from point(1,1) to point(100,100)? I don't think that's it either, but you're getting closer. Lauren Biddle

B makes pixels with any blue have a blue of 100. It does nothing to pixels with no blue.

Good work with B, but what about the others? Brittany Selden

the right answer is definitely D...

I think the right answer is C and D. They both take out the blue. Is that correct? Ashley Coker

No, C would remove all the blue from pixels within a certain distance from the color - think of a big sphere, radius 100, and every point inside that sphere gets its blue removed

D makes pixels with the blue value greater than 100 have a blue value of 0…which eliminates the blue in the whole picture