Monday, December 24, 2012

In a Heart Beat

   Along with the beginning programming features and the math-based Scratch projects I will also be highlighting science projects.         Here's one science project I'm working on. The idea was stimulated by dapontes, a Scratch user that uploaded his 'Parts of the Cell project (here's the link http://scratch.mit.edu/projects/dapontes/2989999) to the Scratch web site.
   I had not paid much attention to the Looks menu until I saw dapontes' project, downloaded it, and looked at the code. I played around with the fisheye effect on Scratch the cat, saw how easy it was to use, and went looking for an object to try it on. There are several effects that can be accessed by clicking on the small black triangle in the [set _______ effects] block.
   Years ago I had made a 'working' heart pump from a couple of plastic bottles, plastic drinking straws, and one of those plastic tubes used to connect two plastic bottles so that a tornado is formed when water flows from the top bottle to the bottom bottle. I made a one-way valve from a piece of duct tape, connected the bottom bottle to the top bottle with plastic straws so that water with a bit of red food coloring pumped around the two bottles, through the one-way 'heart valve'.
   So, I found a heart image, converted it to a png file, imported the image as a sprite, and applied the fisheye effect to the sprite. It took a bit of experimentation to get the effect the way I wanted it but it sure was simple to do! Watch this YouTube video of my project.

   Use this link to download a copy of the project from Scratch, look at the code, and remix it!
   I found a heart beat sound effect on the web. It sounds great on my big Mac but it sounds kind of tinny on my laptop. Maybe you know where to get a better sound file. I also added a heart rate slider so that you can play with the rate at which the heart beats.

2 comments: