Create a movie where a person seems to be fading out of the scene. You can base this on the slowFadeout function.

What will be an ideal response?


```
def swapBack(pic1, newBg, threshold):
for x in range(0,getWidth(pic1)):
for y in range(0,getHeight(pic1)):
p1Pixel = getPixel(pic1,x,y)
if (distance(getColor(p1Pixel),green)< threshold*4):
setColor(p1Pixel ,getColor(getPixel(newBg ,x,y)))
return pic1
def personFadeout(directory):
newBack = makePicture(getMediaPath("beach.jpg"))
for num in range (1 ,60): #59 frames
greenscale = makePicture(getMediaPath("greenscreen-person.jpg"))
#Iteratively replace more of greenscale image (leading to fading person)
replace(greenscale,newBack,num)
# Now , write out the frame
writeFrame(num,directory ,greenscale)
movie = makeMovieFromInitialFile(directory+"//frame00.jpg");
return movie
```

Computer Science & Information Technology

You might also like to view...

Why is prime factorization significant?

a. Because it is computationally difficult b. Because it is difficult to find a prime number c. Because prime numbers are rare d. Because prime numbers are difficult to multiply and divide

Computer Science & Information Technology

XML stands for ____________________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

RG-6 and RG-59 cables are used in what type of systems? (Choose two.)

A) Cable television B) DSL C) Fiber D) Satellite

Computer Science & Information Technology

Next Page, Continuous, Even Page, and Odd Page are types of ____.

A. Page Breaks B. Page Orientation C. Section Breaks D. Themes

Computer Science & Information Technology