Programming and Anna Weltman’s This Is Not A Math Book and Dan Meyer’s Contest

PSA: check out Anna Weltman’s new book, This Is Not A Math Book. Looks great.
Also check out Dan Meyer’s fall contest (ends 10/6/15) that asks the students to be creative in making their own Loop-de-loop mathematical art.
Programming connection: have the students make their loop-de-loop with python and turtles, here is a 3-5-2 loop-de-loop:
or with Scratch, here is a 2-4-5: 2015-09-29_07h56_53

BetterQs Blog

At TMC 2015 I attended a fantastic session by Rachel Kernodle that encouraged us to improve our questioning in class. I took this goal to heart, in fact, it ended up being my “One TMC15 Thing” that I’d like to work on.

Thankfully this message found much traction in the #mtbos. Rachel and Sam Shah started up the BetterQs blog where many guests have written posts on questioning. I wrote a post today, Hints and One Helpful Question. If you’d like, go over and read it, and considering adding BetterQs to your blog aggregator of preference.

Car Talk: False Positive?

From the fantastic car talk puzzler division

RAY: There’s a rare disease that’s sweeping through your town. Of all the people who are exposed to it, 0.1 percent of the people actually contract the disease. There are no symptoms until the disease actually occurs. However, there’s a diagnostic test that can detect the presence of the disease up to a year before it strikes. You go to your doctor, and he administers the test. It comes out positive. You say, “I’m done for!” Then you get a little bit encouraged. You say, “Wait a minute, doc, is this test 100 percent accurate?” Your doctor responds, “Well, not really. It’s 95 percent accurate.” In other words, 5 percent of the people who take the test will test positive but they don’t really have the disease. Here’s the question: What are the chances that you actually have the disease?

Car Talk: Barber Math

From the fantastic car talk puzzler:

RAY: A barber had his first customer of the day, who happened to be a friend. When he was done, the barber refused to take the money from the customer. The fellow said, “Look, I know we’re friends, but, business is business. I want to pay for my haircut.”

The barber said, “Here’s what we’ll do. You open the cash register. I don’t have any idea how much money is in there. But, you match whatever is in there, and then take out 20 bucks.”

The customer says, “Okay,” and he does that.

The barber says, “Gee, I kind of like this.” So, the next customer comes in, he gets his haircut, and the barber says, “You can do the same thing my first customer did. Open the cash register, match what’s in there, and then take out 20 bucks.”

The second customer does that, and he leaves. The third customer does the same. The fourth customer, after receiving his haircut, opens the cash register, and says, “I can’t do it. ”

The barber says, “Why not?”

“There’s no money in here. Not a cent.”

The question is, how much money was in there to start?

Tracking Venus and Earth over 8 years

I came about this tweet:

It reminded me strongly of the waning moon and linear mod art projects that I’ve been playing with.

For instance, here’s a screenshot from the waning moon (specifically y = 56x)
A quick intro: the picture above was made by taking 360 points around a circle, and shifting them by the function (y = 56x), and then graphing a line between the input and output. If the output is greater than 360, then take the remainder after dividing by 360.
pent drift
From lunar planner.

And from John Carlos Baez’s blog:

It’s called the pentagram of Venus, because it has 5 ‘lobes’ where Venus makes its closest approach to Earth. At each closest approach, Venus move backwards compared to its usual motion across the sky: this is called retrograde motion.

Actually, what I just said is only approximately true. The Earth orbits the Sun once every


days. Venus orbits the Sun once every


days. So, Venus orbits the Sun in

224.701 / 365.256 ≈ 0.615187

Earth years. And here’s the cool coincidence:

8/13 ≈ 0.615385

That’s pretty close! So in 8 Earth years, Venus goes around the Sun almost 13 times. Actually, it goes around 13.004 times.

2015-05-19 13h39_41
Hey do you recognize what that ratio is close to?

Anyway, there’s a lot to investigate here. How is the function y = 56x related to these planetary orbits?

Linear Modulus Art

I saw this fantastic webpage a couple of months back.

Screenshot 2015-04-28 at 11.30.56 AM

Tons of fun. I took that idea and made a gif for my weird art Tumblr, Recursive Processing.



Here’s the code and the live (and smoother) version, and here’s the more fun version that is interactive based on the mouse position (some interesting polar math is involved here, x = r cos (theta) and y = r sin (theta) ).

These all work on the same principle, take a bunch of points around a circle, and shift them around the circle based on a linear function. If the output is too large, then they wrap around (clock math). The formal name for this idea is modular arithmetic, a very useful concept in computer programming. A quick example: Take an input value of x = 120, and a function of y = 3x + 20 (mod 360). y = 3 (120) + 20 (mod 360) = 380 (mod 360) = 20 (the remainder after dividing by 360). So make a line between 120 on the circle and 20. The resulting image after calculating 360 different points for y = 3x + 20 is:
Screenshot 2015-04-28 at 11.44.15 AM
But this concept is more difficult to grasp with the unusual step of graphing the points around a circle.

Separate Input from Output

Lets go to a more straightforward representation. Here’s an interactive that might help.
Screenshot 2015-04-28 at 11.50.06 AM
So, this is just about the least interesting function, y = x (mod 10). So if x = 3, then y = 3 + 0 (mod 10) = 3. So draw a line from 3 to 3. Try the interactive yourself, click to change the function and see how it changes the picture.

Here’s another boring function: y = 0x + 0 (mod 10).
Screenshot 2015-04-28 at 11.50.51 AM

Ok, lets get to the interesting stuff, y = 7x + 8 (mod 10). Take x = 4, so y = 28 + 8 (mod 10) = 36 (mod 10) = 6. Draw a line from 4 to 6.
Screenshot 2015-04-28 at 11.50.20 AM


Here’s another interesting picture:

Screenshot 2015-04-28 at 11.51.45 AM

If you really enjoy the picture that you’ve made then you can get a high definition version (5k by 5k) by copying the code, installing and clicking any key. The image will be in the same file as project. Very good for printing in large form if you’re lucky enough to have a big printer.

Here’s a much more interactive version of this same concept. The mouse’s horizontal direction changes the slope of the line, and the vertical direction changes the offset (y-intercept).

Questions For You

How can I bring this into the math classroom?

Where does this fit?

Is modular arithmetic in anyone’s curriculum? If not, why not?

Should I (or you) put together a non-linear version? Exponential, powers, logarithmic?

Other thoughts?