Animation and Integer Operations

11 Sep

For anyone who missed it, I’m experimenting with adding some computer-based math in my seventh-grade pre-algebra curriculum.  I see value in having students write computer programs to apply math concepts they learn in class, and to use computer programming as a creative and artistic medium using mathematics!

Previously, students created geometric designs in four quadrants using JavaScript.  This week, we are learning how to do operations on rational numbers, starting with integer addition and subtraction.  This is contained in some of the bullets under the Common Core standards 7.NS.1, or Colorado’s 1.2a.  To facilitate understanding of integer addition and subtraction, students will learn how to created animated drawings in JavaScript.  Animated drawings move about in four-quadrant space, so students will understand what addition and subtraction of signed numbers do in terms of moving on a number line.  It doesn’t hit on other models of addition and subtraction, and that is one of its weaknesses.  However, I like that it will help them understand what addition and subtraction actually do.  Regardless of your first operand, if you add a positive number, you move in the positive direction on the number line.  If you add a negative number, you move in the negative direction on the number line.  Subtraction does exactly the opposite, and so we need to get to the point where students realize that all addition operations can be rewritten as subtraction and vice-versa.  It is the movement that is important, and reinforcing that internal number line in students’ heads.

I have a sample program here which has the basics of animation, but also has some flaws.  🙂  Part of the joy of programming comes from pointing out those flaws and imagining ways to fix them.

This sample animated circle moves down and to the right, and leaves a trail behind it. They can see how changing variables and operations affects its movement.

The students’ task will be to create an animated drawing that has at least one object moving strictly horizontally or vertically, one object moving toward the lower right, and one object moving toward the upper right.  I’ve added bonus challenges for making objects bounce and switch direction.

This one is more complicated, with two shapes bouncing around the screen. Perhaps this is my differentiation strategy. Advanced students can learn about the “if” statement and make their objects bounce – although I really hope everyone gets there.


The kids LOVE programming, and several of them already have told me that they log on to Khan Academy on their own time and work on their programs.  How often do students go home and do more math than is required?  This is a side benefit I was really hoping for, and I’m pleased that it’s coming to fruition.  I want the kids to be really engaged in learning math and creating wonderful things.  I certainly hope that all students get to this point, and not just some.

I still do not have an assessment plan or differentiation strategy in place, and I know these are areas I need to work on. Coming soon!!  Perhaps tonight I should write rubrics based on how I *think* I would assess students, and give it a non-graded test run.

How should I assess them?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: