Friday, 1 February 2013

The "big-bang" theory

This week was really interesting. We've finally moved on from manipulating static images to making small animations. We've learned about a new built in function known as "big-bang." The name itself caught my attention because I frequently watch The Big Bang Theory. The "big-bang" function takes any image and is able to animate the image using functions known as event handlers. An event handlers is somewhat self-explanatory. It just means that it controls the actual event that is occurring in the animation, whether it be a rotation, reflection, how many ticks/per-second, etc.

I actually understood this weeks content and really enjoyed, but one problem I had that was really minor occurred. I had the perfect animation created with a triangle being rotated clockwise, every half second. But, I didn't like the fact when the image was rotating, some parts of the triangle were not being shown. I didn't know how to make the animation window larger. So I toke a wild guess and thought that because (on-draw show-it) is the event-handler that actually produces that image in the window, I thought that I could increase the y-axis of the window by placing a number there to actually see all of our magnificent triangle. It ended up working, and when I actually went to review the Events Video, Professor Heap actually did make his window larger for the fish using the same method. I was really happy. If your interested, I have posted a copy of both the original code and the new code if you would like to see this minor problem. Make sure to to enable picturing-programming on intermediate student with lambda though!

Original: (big-bang (triangle 100 "solid" "black") (on-tick rotate-cw 1/2) (on-draw show-it))
New:     (big-bang (triangle 100 "solid" "black") (on-tick rotate-cw 1/2) (on-draw show-it 100 105))

This week has been a great week, and I am looking forward for next week's lecture and test.





No comments:

Post a Comment