Friday, September 17, 2010

Second Scratch

   In an earlier post (see June 2010) I announced a forthcoming series of posts on Scratch, the programming language especially designed for (but not limited to) kids. 
   Scratch asks its users to imagine, program, and share. As an example of this three-step sequence, I’ll describe a project of mine that I imagined, programmed, and shared (uploaded) to the Scratch homepage.
   Imagine four motionless ants sitting at the corners of a square, all facing in the counterclockwise direction.

   At a given signal, each ant moves towards the ant ahead of it. What will the paths of the ants look like? Decades ago, I saw this questioned posed in a book. This was long before we had programming languages like Scratch to provide a wordless, dynamic, answer.
   Program
   The script (program) that answers the question is not an entry-level program but Scratch contains two commands that greatly simplifies the programming; point towards and move 5 steps. Since the ants are numbered, it's easy to point each ant towards the ant in front.
   To view what happens when the ants are turned loose, click on the following short, one-minute video. What’s not visible in the video are the scripts that create the ant’s motion.
Share
   As can be seen in the video, the ants trace a spiral path and the straight lines connecting the ants always form a square. 
   I uploaded the working Scratch file to the Scratch web site for any user to look at and any registered user to download. If interested, Scratchers can modify the program to make it do what they would like it to do. For example, what if three ants are at the corners of a triangle? To view my Scratch projects, go to www.scratch.mit.edu and search on grandadscience.
  The Scratch homepage contains data as to the age and numbers of registered Scratch users. Tens of thousands, at each of the ages 11 through 16, form the bulk of Scratch users. Few are getting instruction in public schools. It would appear that kids are learning how to program in Scratch from each other! Also, girls are as well represented as boys.
   I'm not suggesting that all kids need to learn to program in Scratch. I am saying that all kids should know about Scratch and make the decision for themselves. The math and science (particularly the math) they learn in school then has an outlet. 
   To help you and your kids or grand kids get started with Scratch, I've made several short videos. Instead of loading this post with the videos, below are the links to the seven How to Scratch videos I uploaded to Youtube. Every video is short (two minutes or less), builds on the previous video, and asks the viewer to duplicate (with their downloaded version of Scratch) what's just been viewed.
   The first video shows how easy it is to download the Windows or Mac version of Scratch. Be sure to bookmark the homepage. By the seventh video (15 instructional minutes later), the user has written a script that draws a square with any side length.
   I will be here to answer questions about Scratch and I will occasionally post a Scratch update or project.
Scratch A1.1 – How to Download Scratch
Scratch A1.2 – The Move and Turn Blocks
http://www.youtube.com/watch?v=IWH5uaZLtgA&feature=related
Scratch A1.3 – Pen Commands: pen down, pen color, pen size
Scratch A1.4 – The Repeat and wait blocks
Scratch A1.5 – How to edit the Scratch the cat sprite to add a pen
Scratch A1.6 – The 'Click on the Green Flag' block and the Presentation Mode
Scratch A1.7 – Defining the variable 'distance' for use in the Square Script

Thursday, September 9, 2010

Behind the Mirror

   In the first mirror post (see The Two of You, August 2010) we looked into a mirror and observed that our image was reversed, left-to-right. We also observed that our image appeared to be behind the mirror's surface. Somehow, our image had moved behind the wall! Also, when trying to touch the nose on our mirror image, we could get no closer than than surface of the mirror.
   Over a series of posts, I will share three simple investigations that explore the relationship between an object and its mirror image. The first investigation is to have the kids simply put a mirror on top of a ruler. In the photo below, a mirror is set on top of a see-through plastic ruler and aligned at right angles to the ruler so that the ruler appears to extend straight into the mirror.
   Place a small object (I used a green pushpin) on the ruler at a point three inches in front of the mirror. Ask the kids to report how many inches the mirror image’s position on the ruler appears to be into the mirror. Now have them move the pushpin, along the ruler, and tell them to watch its mirror image mimic the position of the object. Kids like color so instead of an inch-ruler, I used my graphics program to make a series of colored circles, spaced an inch apart. If you would like a copy of this page, shown below, just shoot an email to grandadscience@gmail.com and I will send you a pdf.
   Use the same procedure for observing object-image distances with the color bar as used for the ruler. This is how the color bar looks in the mirror.
   Now is a good time to talk to the kids about forming a hypothesis as to the relationship between the distance an object is placed in front of a flat mirror and the distance the object appears to be behind the mirror. It’s important that kid’s understand that the hypothesis (idea to be tested) comes from observation and experiment and is just not a wild guess or prediction.
   A good hypothesis, easily tested is,
The distance an object is placed in front of a flat mirror
 is equal to the distance the mirror image appears
 to be located behind the mirror.
   Distance is a quantity that can be measured so in the next mirror post we will discover how two pushpins and a ruler are used to test the hypothesis.
   This post motivated me to read again Lewis Carroll's Through the Looking Glass in which Alice, of Wonderland fame, steps into and behind a mirror. The best version of both tales is found in The Annotated Alice, by Martin Gardner. Gardner's notes to the text illuminates the math and science (Carroll was a mathematician) that fill the background in the stories. A game of Chess directs the action in Through the looking Glass and Alice confronts a host of marvelous characters like the mirror-image twins, Tweedledee and Tweedledum. I recommend adding Through the Looking Glass to the kid's library as it is literature, and, if you get Gardner's annotated version, learning the math and science connections makes a classic even better.
   Here's a short animation I made that will summarize the object-image relation in mirror reflection.