15-112 Spring 2015 Homework 3
Due Sunday, 1-Feb, at 10pm

Read these instructions first!
  1. Group Study Session [10 pts, manually graded]
    Note: This is the only non-SOLO part of the hw. This is the last week we will require study groups. In hw1 you did CA-led small-group sessions. In hw2 you did student-led small-group sessions. For hw3, you'll do CA-led large-group sessions. These will be just like our normal Thursday night optional sessions, only for one hour rather than two hours. Here are the session times and locations:

       Thu 8-9pm in DH 2210
       Thu 9-10pm in DH 2210
       Fri 7-8pm in DH 2210

    If necessary, we will offer a Saturday morning session, probably 8am, just for those who absolutely cannot make one of the times list above (in that case, email Anqi (acong) by Thursday night requesting the 8am Saturday session). For the few of you who are away on university-approved trips that require you to be off-campus on Thursday, Friday, and Saturday, you need to provide documentation of the trip to Anqi (acong) by the hw3 deadline, and then you will be excused from this part of the hw this week.

    After this week, we will no longer require study groups as part of your hw. However, our sincere hope is that you are forming good habits, and will elect to use the various forms of small-group and large-group study effectively for the rest of 112 and beyond.

  2. f14 Quiz 3 [10 pts, manually graded]
    In the triple-quoted string at the top of your hw file, include the solutions to f14's quiz3 (except for the bonus, which you should skip (or do for fun if you wish)). Remember that this is SOLO!

  3. nthNearlyPalindromicPrime [10 pts, autograded]
    See s14-hw3. Be sure to carefully read the writeup, including the very helpful hints at the top of the document (look for "Additional hints (as posted on Piazza, and then collected here)").

  4. nthCarolPrime [10 pts, autograded]
    See s14-hw3. Again, check the hints at the top.

  5. nearestKaprekarNumber [10 pts, autograded]
    See s14-hw3. Same deal about those hints!

  6. loadingAnimation [15 pts, manually graded]
    Write the function loadingAnimation(canvas, width, height, step) so that stepAnimation.run(loadingAnimation) produces the animation described in this video.

    You do not have to match exactly, but you must be reasonably close. For example, you do not have to match the exact shade of gray of the large circle, or the exact radius of the large or small circles, or the exact font of the text, though you must be reasonably close in those cases. By contrast, you do have to exactly match that there are 8 small circles, that they move clockwise, that their fills range from black through shades of gray to white, and that the black circle is always opposite (180 degrees from) the white circle. And so on.

  7. alternatingGridAnimation [15 pts, manually graded]
    Write the function alternatingGridAnimation(canvas, width, height, step) so that stepAnimation.run(alternatingGridAnimation) produces the animation described in this video. As with all the step animations on this hw, you have to be very close in matching, and exact when reasonable. Since the video says the color names, you have to match those exactly. By contrast, the font you use for the large brown text just has to be close to the video spec.

  8. fancyWheelGridAnimation [20 pts, manually graded]
    Write the function fancyWheelGridAnimation(canvas, width, height, step) so that stepAnimation.run(fancyWheelGridAnimation, width=800,height=600,timerDelay=128) produces the animation described in this video.

  9. Bonus/Optional: bonusFunAnimation() (2.5 pts)
    This bonus is designed to promote lots of fun creativity. For bonus, and for fun, write the function bonusFunAnimation(). This function takes no parameters, and it calls stepAnimation.run on another function you write which actually does the bonus animation (this way, you can choose whatever dimensions and timerDelay that is most appropriate for your animation).

    Then: write a really interesting, attractive, and clever step animation. You may use canvas calls beyond those we have covered in class (for example, arcs), but you may not use images, mouse or keyboard events, or store or retrieve data from files. The grading will be completely subjective (though as fair as we can make it, given the rich variety of submissions we expect), and points will only be awarded for what are clearly genuine attempts, and then with only 2.5 points max available, so do this for the joy and fun of it and not so much the points. That said, we'll have a little friendly competition, and the best 3 projects submitted will win fame, fortune, and glory (not really, but maybe a Klondike Bar or some such). Have fun!!!