Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sometimes in motion pictures, a special animation is used to indicate a scene change. These special animations, or film transitions, can range from the previous

Sometimes in motion pictures, a special animation is used to indicate a scene change. These special
animations, or film transitions, can range from the previous scene gradually fading into black before the
new scene presents itself to the next scene spinning into the centre of the screen over the previous scene.
You will simulate one such transition in Processing by drawing a scene and having a portion of it replaced
completely with black.
Draw a simple overhead view of a road for your scene. The background should be non-black (to distin-
guish itself from our transition colour) and the road should be a simple light gray with a few white stripes
indicating lane markers on it.
On a mouse click, a black rectangle should fill the entire height of the screen from the leftmost edge of the
canvas to the current x-coordinate of the mouse. Make sure that on a new mouse click, the appropriate
amount of the scene and black rectangle are visible, i.e. if you clicked further to the left of the canvas after
the previous click, then more of the scene should be revealed and less of the screen should be covered
by the black rectangle.
Hint: Think about using functions to better organize your program. As a rule, if you ever find yourself
duplicating the same code in more than one spot, you should almost certainly encapsulate that code in a
function!
Figure 2: Initial scene (left). A mouse click closer to the right side of the canvas covers more scene with
transition (middle). A mouse click closer to the left side of the canvas reveals more scene than transition
(right).
What To Hand In: Your Processing source code in a file called a2q2.pyde. You should find this file in your
Processing sketch folder.
Evaluation:
0 marks for submitting nothing and/or files that cannot be opened.
-1 mark for lack of identification in the solution.
1 mark for drawing a scene that meets specifications.
2 marks for mouse click filling the screen with the transitional rectangle correctly.
1 mark for revealing the scene correctly on each mouse click.
1 mark for sensible documentation
Page 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Do you have any thoughts on the IRS's modified Schedule M-3 form?

Answered: 1 week ago

Question

What language used orthogonality as a primary design criterion?

Answered: 1 week ago

Question

=+4. Does the source have the ability to investigate this audience?

Answered: 1 week ago