Difference between revisions of "CSC111 Final Exam 2014"

From dftwiki3
Jump to: navigation, search
Line 86: Line 86:
 
=Problem #2=
 
=Problem #2=
 
<br />
 
<br />
Write a JES program that takes an image and generates a circular "foggy" border around the center, as illustrated below.  On the left is the original image, and on the right the image generated by JES.
+
Write a JES program that takes an image and generates a circular soft mask around the center of the image, as illustrated below.  On the left is the original image, and on the right the image generated by JES.
 
<center>
 
<center>
 
<br />
 
<br />
Line 103: Line 103:
 
==Implementation Details==
 
==Implementation Details==
 
<br />
 
<br />
* The "circle of fog" is as big as the width or the height of the image, whichever is smaller
+
* The soft mask should be as big as the width or the height of the image, whichever is smaller
 
* The fog can be white or black, depending on your own preference
 
* The fog can be white or black, depending on your own preference
 
* The image is fully white or fully black outside the "circle of fog"
 
* The image is fully white or fully black outside the "circle of fog"
* The amount of "fog" inside the circle is up to you.  But there should be some fog!  The  pixel at the very center of the foggy image should retain its original color.   
+
* The amount of softness inside the circle is up to you.  But there should be some softening of the colors!  The  pixel at the very center of the foggy image should retain its original color.   
 
* Your JES program should only ask the user for a file name, nothing else.
 
* Your JES program should only ask the user for a file name, nothing else.
 
<br />
 
<br />
Line 112: Line 112:
 
<br />
 
<br />
 
* Your program should be called '''finalb.py'''
 
* Your program should be called '''finalb.py'''
* You should submit the result of  
+
* You should submit the result of applying your program to the 
 
<br />
 
<br />
 
<br />
 
<br />

Revision as of 22:32, 25 April 2014


...