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: 63% (11 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...
-
2 A B D E F G H 1 Evaluating Service Level with Quantity Discounts 0 = 200 Would the answer be different if there was $10 salvage value? Why? 150 150 40 40 2 3 4 5 6 7 8 9 10 11 12 Input Mean demand,...
-
Does your marketing plan involve selecting channels and intermediaries? If the answer is no, read no further and do not include this element in your plan. If the answer is yes: 1 Identify which...
-
On March 16, 1990, an Air Force SR-71 set a new continental speed record, averaging a velocity of 2112 mi/h at an altitude of 80,000 ft. Calculate the temperature (in degrees Fahrenheit) at a...
-
QUESTION 2 ( 2 0 Marks ) 2 . 1 REQUIRED Use the information provided below to determine the cost ( as a percentage, expressed to two decimal places ) to Sibiya Stores of not accepting the discount....
-
Sizes of soft drinks sold by a fast-food restaurant (small, medium, and large) Determine whether the data are qualitative or quantitative.
-
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...
-
Assume cost of goods sold on an accrual basis is $300,000, accounts payable increased by $20,000, and inventory increased by $50,000. Cash paid for merchandise is: a. $370,000. b. $230,000. c....
-
In addition to the strongest military in the world, the United States wields enormous soft power. Define soft power. What factors make the United States powerful when it comes to soft power?
-
Tampa by the Bay Cardiology practice is experiencing long wait times for new patient appointments. Next available appointment is 30 days. The administrator has asked the practice manager to construct...
-
In 2013, Idalia Hernndez Ramos, a middle school teacher in Mexico, was a victim of cyber harassment. After discovering that one of her students tweeted that the teacher was a "bitch" and a "whore,"...
-
Your life couldn't be any better. You just accepted a new role as a senior consultant for a project management services firm in San Francisco, and the move is finally happening. You've got a great...
-
What are the two "engines" that drive earth's processes, how do they work (basically) and what are their energy sources? How do the "engines" influence and interact with the Earth Systems? (provide a...
-
An echo is sound that returns to you after being reflected from a distant surface (e.g., the side of a cliff ). Assuming that the distances involved are the same, an echo under water and an echo in...
-
For the following arrangements, discuss whether they are 'in substance' lease transactions, and thus fall under the ambit of IAS 17.
-
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?
-
Suppose I have computed the cost of carbon per mile for my car at 0 . 0 1 2 per mile. Assume that the interest rate is 4 % and that I drive the car 2 8 , 0 0 0 miles per year. What is the present...
-
Imagine that in stable growth period, the firm earns ROIC of 10% and has after tax EBIT of 200 and reinvestment $ of 40. What is the steady state growth rate? 20% O 10% 2%
-
Tanner-UNF Corporation acquired as a long-term investment $160 million of 5.0% bonds, dated July 1, on July 1, 2021. Company management has the positive intent and ability to hold the bonds until...
Study smarter with the SolutionInn App