Create a movie where a person seems to be fading out of the scene. You can base
Question:
Create a movie where a person seems to be fading out of the scene. You can base this on the slowFadeout function (Program 177 (page 393)).
Data from Program 177
Transcribed Image Text:
def swapBack (pic1, back, newBg, threshold): for x in range (0, getwidth(pic1)): for y in range (0, getHeight(pic1)): p1Pixel = getPixel(picl,x,y) backPixel = getPixel(back,x,y) if (distance (getColor(p1Pixel),getColor(backPixel)) < threshold): setColor(p1Pixel,getColor(getPixel (newBg, x,y))) return picl def slowFadeout (directory): origBack = makePicture(getMediaPath("bgframe.jpg")) newBack = makePicture(getMediaPath("beach.jpg")) for num in range (1,60): #59 frames
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 57% (7 reviews)
def swapBackpic 1 newBg threshold for x in range0getWidthpi...View the full answer
Answered By
AKILESH M
I has completed master degree in physics and very much interested in answering doubts related to physics. I can also teach students for better explanation of physics of concept this my strength too. I had scored 83% in masters degree and I hope the knowledge gained will be helpful for this work. I will do my work in the trusty manner.
0.00
0 Reviews
10+ Question Solved
Related Book For
Introduction To Computing And Programming In Python A Multimedia Approach
ISBN: 9780134025544
4th Edition
Authors: Mark J. Guzdial, Barbara Ericson
Question Posted:
Students also viewed these Computer science questions
-
Write a function to create a movie where one item is moving from the left to the right and another item is moving from the right to the left.
-
Write a function to create a movie where one item is moving from the top to the bottom and another item is moving from the bottom to the top.
-
Write a function to create a movie where one item is moving in a diagonal line from top left to bottom right and another item is moving from the right to the left.
-
A person is pulling on a rope attached to a locomotive of mass m = 100 tons (Fig. 1, right). The person is pulling with a constant force F that is 2 times greater than their body weight, at an upward...
-
Temperature may alternatively be defined as Prove that this definition reduces the net entropy change of two constant-volume systems filled with simple compressible substances to zero as the two...
-
Use the Excel spreadsheet FV function to determine the cost of borrowing $100 billion for 10 years at 8 percent compounded quarterly.
-
Explain with the help of neat sketches, the working principle of four stroke petrol engine.
-
On January 1, 2006, the Vallahara Company purchased machinery for $650,000 which it installed in a rented factory. It is depreciating the machinery over 12 years by the straight-line method to a...
-
A telecommunications company owns satellites A, B, C and D, which are in orbit around the Earth. At a particular instant in time, all the satellites lie on a circle whose diameter crosses the centre...
-
A device has been proposed that will serve as a blood oxygenator for a heartlung bypass machine, as shown in the figure below. In this process, blood containing no dissolved oxygen (O 2 , species A)...
-
Remember the blending of pictures in Chapter 6? Try blending one picture into another as a movie, slowly increasing the percentage of the second (incoming) image while decreasing the percentage of...
-
Build an animation of at least three seconds in duration (30 frames at 10 fps, or 75 frames at 25 fps).You must have at least three things in motion during this sequence. You must use at least one...
-
A Central Railway freight train leaves a station and travels due north at a speed of 60 mph. One hour later, an Amtrak passenger train leaves the same station and travels due north on a parallel...
-
(Research Problem) Obtain a copy of a recent comprehensive annual financial report (CAFR) of a state or local government from the government, the Internet, your professor, or a library. Required (1)...
-
Widely known as an ethical company, Dell recently committed itself to becoming a more environmentally sustainable business. After reviewing the About Dell section of its website...
-
Most everyone is familiar with Angry Birds, the video game in which players use a slingshot to launch birds at pigs stationed on or within various structures. The goal is to destroy all the pigs on...
-
Are benchmarking data available in the simulation exercise in which you are participating? If so, do you and your co-managers regularly study the benchmarking data to see how well your company is...
-
If a new product or service seems like the perfect option to solve a problem or capitalize on an environmental trend, but its customers find out it cant deliver on its promises, they will quickly...
-
Elaine's original basis in the Hornbeam Partnership was $30,000. Her share of the taxable income from the partnership since she purchased the interest has been $90,000, and Elaine has received...
-
Could a set of three vectors in span all of? Explain. What about n vectors in when n is less than m? R4
-
What is the purpose of Nonce in an end-point authentication protocol?
-
Consider our authentication protocol in Figure 8.18 in which Alice authenticates herself to Bob, which we saw works well (i.e., we found no flaws in hi. Now suppose that while Alice is authenticating...
-
Suppose certifier.com creates a certificate for foo.com. Typically, the entire certificate would be encrypted with certificr.com's public key. True or false?
-
What are the 2 main dimensions of an organizational culture we must consider when we initiate a lean deployment? Briefly explain each dimension
-
Mianzi, or face, is an important concept in Chinese negotiations and the wider environment of Chinese business culture. What does this concept mean?
-
Homestead Crafts, a distributor of handmade gifts, operates out of owner Emma Finn's house. At the end of the current period, Emma looks over her inventory and finds that she has 1,400 units...
Study smarter with the SolutionInn App