INFORMATION
BE SURE TO ASK IN THE LAB IF YOU NEED HELP WITH ANY STEPS!!!!
PART I.
These problems fit with this TUTORIAL on programmer defined-functions that we did in lab on Monday, Nov. 19th.
1. Create a Snow Man function (1.0 point)
Step 1. Here is the House sketch that we did in the tutorial, but there is a Snow Man next to the house. Find the code for the Snow Man in the draw() function, and put that code into it's own appropriatly named function. Don't add any parameters to you function (you will add them in the next step).
Save As.. this sketch, naming it yourname-SnowMan, (i.e. my sketch would be called Chipp-SnowMan).
Turn this sketch (yourname-SnowMan) in with your HW F
2. Add parameters to the the Snow Man function (1.0 point)
Make a copy of the program you were working on in the previous step:
Step 1. Add two parameters to the SnowMan function so you can position the Snow Man anywhere in the sketch. This is exactly what we did with the House function in the Tutorial.
Step 2. Be sure to add comments to your Snow Man function to document what the parameters do.
Step 3. This world is black and white and really boring! Add some color to the world by adding fill and stroke functions to your code.
Step 4. Use the house function and your snow man function to populate the sketch with at least 5 houses and snow men.
Here is an example what your column of rectangles might look like. The spacing, and number of rectangles may be different.
Save As.. this sketch, naming it yourname-MoveSnowMan, (i.e. my sketch would be called Chipp-MoveSnowMan).
Turn this sketch (yourname-MoveSnowMan) in with your HW F
3. Create your own function with Parameters (1.0 point)
Make a copy of the program you were working on in the previous step:
Step 1. Add your own feature to the world! You might want to use the character you created in Problem 3 from HW E Part 1. You could create your own new feature. Be creative and colorful! Make your feature with at LEAST 3 shapes.
Step 2. Put your feature into its own appropriately named function, and add at least 2 parameters to move it around the screen. Try to add a parameter to change the size of the character/feature, how would you do that? (Think about how we added the xpos and the ypos parameters to the house function in the tutorial).
Step 3. Add comments to your functions, include your name in those comments, and include descriptions what the parameters do in the function.
Step 4. USE YOUR FUNCTION in the sketch. Populate your sketch with at least 5 instances of your feature/character.
Step 5. Share your function with the class! Put the code for your function in the message body of an e-mail (DON'T SEND IT IN A TEXT FILE AS AN ATTACHMENT), and send it to this e-mail: bc-computer-art@googlegroups.com
Step 6. This e-mail will post the function to a Google Groups news group: bc-computer-art Take a look online at this group to see the Teddy Bear Example that I sent in earlier. Make sure that your function is posted (you may have to wait a few minutes for it to get posted by Google).
You will not get credit for this Problem if you don't post the function online at this group.
Save As.. the sketch you were previously working on, naming it yourname-MyFunction, (i.e. my sketch would be called Chipp-MyFunction,).
Turn this sketch (yourname-MyFunction) in with your HW F
4. Use someone else's function in your Sketch (1.0 point)
Make a copy of the program you were working on in the previous step:
Step 1. Go to the class's Google Group: bc-computer-art and find someone else's function (DO NOT USE MY Teddy Bear Function - you will NOT get credit for this problem if you use that function!)
Step 2. Copy that function from the Google Group and put it into your program. Be SURE to click on "-Show quoted text-" in the message online, since that web-site might have hidden other parts of the function (like the ending curly brace: } ). You MAY have to fix the function by adding the ending curly brace to it in your program!!!!
Step 3. Use this person's function in your program and populate your sketch with at least 5 instances of it.
Save As.. the sketch you were previously working on, naming it yourname-OtherFunction, (i.e. my sketch would be called Chipp-OtherFunction).
Turn this sketch (yourname-OtherFunction) in with your HW F
5. Animated World (1.0 points)
Make a copy of the program you were working on in the previous step:
Step 1. Have at least 1 of the characters/features in your world animate to time. You may want to look at this example from the tutorial to get an idea how to animate it. This is what we did in Part 4 and Part 5 in Homework E Part 1.
Save As.. the sketch you were previously working on, naming it yourname-AnimatedWorld, (i.e. my sketch would be called Chipp-AnimatedWorld).
Turn this sketch (yourname-AnimatedWorld) in with your HW F
BONUS WORK
(1.0 points) Most Popular Function!
The person who's function is the MOST POPULARLY USED in other people's sketches will get 1 extra credit point. You can increase your chances by being used by:
1. Getting your function up on the Google Group Early!
2. Adding MORE THAN ONE DIFFERENT FUNCTIONS to the Google Group (SPAMMING THE GROUP WITH THE SAME FUNCTION WILL GET YOU A ZERO ON THE ENTIRE HOMEWORK!)
3. Having a really COOL Functions - (i.e. A UFO!)
(1.0 - ? points) Be Creative
Add more features/characters to your world by using functions that you get from the online class group, or others that you create yourself. Add interactivity with the mouse variables (mouseX, mouseY, and mousePressed). Have things animated with time. The amount of points you get will be based on the effort you put into integrating the things you've learned so far with Processing.
Save As.. the sketch you were previously working on, naming it yourname-Creative, (i.e. my sketch would be called Chipp-Creative).
Turn this sketch (yourname-Creative) in with your HW F