Download - CSC121,&Introduction&to&Programming& :Creating!a!Collage!cs.furman.edu/~tallen/csc121/materials/prog03.pdf! "1"! CSC121,&Introduction&to&Programming& Prog03:Creating!a!Collage! DIRECTIONS.!Devise!a!Python!programthat!models!the!process!described!below.!Createa!work

Transcript
Page 1: CSC121,&Introduction&to&Programming& :Creating!a!Collage!cs.furman.edu/~tallen/csc121/materials/prog03.pdf! "1"! CSC121,&Introduction&to&Programming& Prog03:Creating!a!Collage! DIRECTIONS.!Devise!a!Python!programthat!models!the!process!described!below.!Createa!work

 

  -­‐‑1-­‐‑  

CSC121,  Introduction  to  Programming  Prog03:  Creating  a  Collage  DIRECTIONS.     Devise  a  Python  program  that  models  the  process  described  below.  Create  a  work  folder  for  submitting  the  assignment.  Name  the  folder  with  your  last  name  +  Prog03  as  a  suffix.  Besides  a  copy  of  your  final  program,  include  in  your  work  folder  any  needed  resources  (pictures,  graphics,  etc.)  necessary  for  executing  the  program.  Upload  the  folder  to  csc121INFolder  in  our  shared  Box  account.  Problem  Statement.  

  Create  an  application  that  makes  a  collage  of  images  and  graphics  expressing  something  about  you,  your  interests,  or  your  life  here  at  Furman.  The  collage  image  should  be  of  reasonable  size  (e.g.,  800  ×  600  pixels  or  larger).  It  should  combine  images  and  graphics  in  a  way  that  expresses  your  story.  Specifications.  

1.   Name  your  source  program  file  collage.py.  It  should  combine  a  variety  of  elements  from  the  repertoire  of  image  processing  and  graphics  skills  that  you  have  acquired  so  far.  Here  is  a  list  of  features  to  consider.  

•   photos,  •   ornamental  graphic  images,  such  as  lines,  ovals,  boxes,  etc.,  •   graphic  text,  and  •   special  effects,  such  as  transparency,  blending  images,  edge  enhancement,  

smoothing,  sharpening,  etc.  2.   For  an  example  of  how  to  put  together  a  compound  image,  see  Program  77  (pages  170–1.)  You  can  find  additional  information  about  JES  picture  functions  in  the  JES  IDE.  Consult  the  Help  Menu  for  section  06,  “Understanding  Pictures.”  3.   The  application  should  assemble  the  components  and  write  them  to  a  single  (image)  file  in  your  work  folder.  Again,  make  sure  that  you  submit  all  media  sources  needed  in  your  work  folder  for  testing  your  application  properly.  4.   As  in  the  example,  the  main  function  (i.e.,  the  function  that  is  called  in  the  Command  Area  should  be  named  createCollage(  ).  NOTE:  Since  this  is  a  standalone  application,  it  needs  no  defined  parameters.  All  of  the  pictures  used  are  fixed  or  static,  so  they  can  be  encoded  into  your  source  code.  However,  be  sure  to  use  relative  referencing  so  that  the  program  can  be  executed  on  any  machine—not  just  yours.  The  setMediaPath(  )  function  can  be  used  to  handle  the  actual  referencing.     On  the  other  hand,  it  is  not  recommended  that  you  write  it  as  one  long,  single  sequence  of  code—even  if  the  example  does  so.  Instead,  use  top-­‐‑down  design  for  your  organization  and  development.  For  example,  you  will  likely  be  combining  several  original  images.  So,  it  makes  sense  to  design  individual  functions  to  treat  each  one.  These  would  be  called  by  createCollage(  ).  Special  effects  or  other  tasks  that  might  be  used  by  more  than  one  picture  make  good  candidates  for  separate  functions  too.  5.   Your  program  will  be  graded  on  several  factors.  

Page 2: CSC121,&Introduction&to&Programming& :Creating!a!Collage!cs.furman.edu/~tallen/csc121/materials/prog03.pdf! "1"! CSC121,&Introduction&to&Programming& Prog03:Creating!a!Collage! DIRECTIONS.!Devise!a!Python!programthat!models!the!process!described!below.!Createa!work

 

  -­‐‑2-­‐‑  

a.   correctness  (i.e.,  program  works  without  errors),  b.   overall  results  (content,  interest,  variety  of  effects,  and  originality),  and  c.   program  design  features  (use  of  top-­‐‑down  design,  etc.).  

6.   In  order  to  preserve  your  collage  as  a  picture  file,  use  the  writePictureTo(  )  function.  Here  is  an  example,  

writePictureTo(canvas,  “AllenCollage.jpg”)  

where  canvas  is  a  picture  object  variable  and  the  string  “AllenCollage.jpg”  names  the  file  containing  the  picture.  7.   Here  are  some  samples  of  creations  from  previous  class  sections.  Use  your  imagination  and  have  some  fun.  

 

 

Page 3: CSC121,&Introduction&to&Programming& :Creating!a!Collage!cs.furman.edu/~tallen/csc121/materials/prog03.pdf! "1"! CSC121,&Introduction&to&Programming& Prog03:Creating!a!Collage! DIRECTIONS.!Devise!a!Python!programthat!models!the!process!described!below.!Createa!work

 

  -­‐‑3-­‐‑  

 

 

Page 4: CSC121,&Introduction&to&Programming& :Creating!a!Collage!cs.furman.edu/~tallen/csc121/materials/prog03.pdf! "1"! CSC121,&Introduction&to&Programming& Prog03:Creating!a!Collage! DIRECTIONS.!Devise!a!Python!programthat!models!the!process!described!below.!Createa!work

 

  -­‐‑4-­‐‑  

 

 

Page 5: CSC121,&Introduction&to&Programming& :Creating!a!Collage!cs.furman.edu/~tallen/csc121/materials/prog03.pdf! "1"! CSC121,&Introduction&to&Programming& Prog03:Creating!a!Collage! DIRECTIONS.!Devise!a!Python!programthat!models!the!process!described!below.!Createa!work

 

  -­‐‑5-­‐‑  

 

Page 6: CSC121,&Introduction&to&Programming& :Creating!a!Collage!cs.furman.edu/~tallen/csc121/materials/prog03.pdf! "1"! CSC121,&Introduction&to&Programming& Prog03:Creating!a!Collage! DIRECTIONS.!Devise!a!Python!programthat!models!the!process!described!below.!Createa!work

 

  -­‐‑6-­‐‑  

 

 DUE  DATE:  March  29.