Answered step by step
Verified Expert Solution
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 nonblack 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 xcoordinate of the mouse. Make sure that on a new mouse click, the appropriate
amount of the scene and black rectangle are visible, ie 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 : 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 aqpyde. You should find this file in your
Processing sketch folder.
Evaluation:
marks for submitting nothing andor files that cannot be opened.
mark for lack of identification in the solution.
mark for drawing a scene that meets specifications.
marks for mouse click filling the screen with the transitional rectangle correctly.
mark for revealing the scene correctly on each mouse click.
mark for sensible documentation
Page
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started