Question: In python Write a program wipeDiagonalTransition(pictureFrom, pictureTo)which takes as input two pictures and creates a transition from the first to the second top left to
In python
Write a program wipeDiagonalTransition(pictureFrom, pictureTo)which takes as input two pictures and creates a transition from the first to the second top left to bottom right with 45 degree diagonals. See the video forthe desired effect.
Initialize all variables you may need.
Create a loop counting the diagonals. Use the dimension of the picture to determine the number of diagonals you need. Note that once you know the x coordinate on a diagonal, the y coordinate is known since for every diagonal x+y is constant. Inside the loop use a second loop to copy the colors from pictureTointo your transition picture. Repaint your picture after a diagonal has been drawn.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
