LearningForward

Kent Chesnut's technology in education blog.

November 8, 2009

Scratch as a Simulation Engine - Part 1

Filed under: Simulation, Constructivism, Scratch — kchesnut @ 10:46 pm

Wow!  It’s been 7 weeks since I posted.  That’s a long gap, even by my lax standards.

 For the next few posts, I’ll be looking at Scratch as a tool for simulating events.  Since my interest in this is mainly education, most of these will be simulating a school problem.

The problem for this simulation came to me as a text message from my daughter Brittany… something like this…

“2 bicycles start 20 km apart and move toward each other at 10 km / hour.  A fly flies  between the bicycles at 30 km/hour until they crash together smashing the fly.  How far does the fly fly?”

The statement of the problem leads one to start drawing lines back and forth between the converging bicycles.  This is the hard way to work the problem.  I responded to Brit’s text with a question… “How long until the bicycles crash together?”  Thinking of the problem this way leads to a very simple solution.

I wondered, however, if there is educational merit to actually seeing the problem unfold in a simulation.  I believe building this simulation would be possible for someone at Brit’s level (High School Senior, good programming skills, taking Physics).  I decided to simulate the problem in Scratch in order to investigate the educational opportunities for a student faced with such a problem. 

Simulation ScreenshotA screenshot of the program is shown to the right.  I substituted cats for the bicycles and a butterfly for the fly for ease (as Scratch came preloaded with those graphics).

Run the project by clicking here (click on the green flag to start the animation).  The project is available here.  Note that Scratch 1.4 or later is needed to open the project.

So what’s difficult about this simulation? 

  • Setting up scaling.
    The cats start 20 KM apart and the Scratch screen has 480 horizontal pixels.  Therefore, I chose to let each KM be 20 pixels. 
  • Setting relative velocities.
    I don’t really care how fast the cats and the butterfly move, but their relative velocities must match those of the problem statement.  I chose to let the cats move toward each other at the variable “Speed” pixels per simulation iteration.  So “Speed” was defined as the speed of the cats.  Since the butterfly moves 3 times as fast as the cats, the butterfly moves 3x”Speed” pixels each iteration.
  • Calculating the actual distance moved.
    The velocities are in pixels / iteration, but the problem needs an answer in kilometers.  The distance moved is simply the butterfly velocity / the number of pixels per KM.

So the simulation is probably doable, but challenging for a High School Physics student with some Scratch experience and reasonable programming skills.  But would the exercise of creating the simulation be a worthwhile educational endeavor?  Reasons I believe the exercise might be worthwhile include:

  •  The simulation provides an method for a student who doesn’t see the easy solution to still solve the problem.  If the simulation included the flight time as a displayed variable, the student may make the connection between the butterfly speed and the time to the collision.  I believe such ”aha!” moments are powerful learning times for students. 
  • The activity certainly falls under the Constructivist category.  As such, student learning may prove deeper and more transferrable than just working the problem.

I’d appreciate reader feedback…

  • Would such a simulation be a worthwhile educational effort? 
  • If so, what benefits to the student do you see from such an effort?

Next time… we’ll look at a fairly complex simulation in Scratch.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress