Example Cartoon Collage
Write a function named cartoon in a file named cartoon.py that accepts NO input to create a cartoon collage: Place several characters (at least three) into a scene, and make at least two of the characters "say" something using the addText function. You can see an example at Example Cartoon Collage. (Yes, you are ENCOURAGED to be humorous – but tasteful!. If it couldn't appear in The Technique, don't hand it in as homework!)
The addText function takes four inputs:
- The picture that the text should be added to.
- The X position (left edge) where the text should appear.
- The Y position (top edge) where the text should appear.
- The text (string) that should be added to the picture. (Right now, we're not showing you how to use different fonts and styles – that comes later.)
- You may use any pictures in MediaSources or of your own choosing (paint them in Paint? from a digital camera?) as backgrounds. You cannot use a blank white canvas as a background.
- You may use any pictures in MediaSources or your own choosing (Painting? Camera?) as characters.
- At least two of the characters should be inserted with SOME image manipulation, any image manipulation you want (!). Some ideas:
- Maybe you use the same image several times, with changes, and you have the original saying something to the others about being "clones" and some are "broken."
- Maybe you use one image looking into a mirror, but it's a fun house mirror, so you scale the image down that goes into the mirror.
- Maybe you have three birds, and you use color manipulation to make different colored birds.
- Maybe you have one image facing right, and you compose it on the left of your screen. Then you flip the image so that it's facing left, and you compose it on the right, and now it looks like the two images are facing one another.
Your single function should make all of this happen–all of the effects and compositing must occur from the single function cartoon(). IT IS PERFECTLY OKAY FOR cartoon() TO USE OTHER FUNCTIONS! Your TA will only setMediaPath() and will put all your input pictures in her mediasources directory, and then execute cartoon()–and will expect to see a collage get generated
Links to this Page