Thursday, May 9, 2019

star polygon fun

Star and compound polygons are pretty mathematical objects that are fun to draw or create in code.
star and compound polygons
on 2 to 9 vertices

You might draw ten pointed polygons while exploring the multiplication table, for example. In the picture below, skip counting by 6 while drawing a line between the last digits of consecutive numbers gives us a pentagon: counting 0, 6, 12, 18, 24, 30 we draw lines connecting 0, 6, 2, 8, 4, and 0.

skip counting by 6 draws {5/2}

When drawing star and compound polygons by hand, you start with n points spaced evenly around a circle, and then from each point connect to another, always skipping over the same number of points. If you skip over 0 points, you get the regular n-gon. If you skip over k points, and k+1 is relatively prime with n, you will get a star polygon, if n and k+1 share factors, you get a compound of several regular or star polygons.

On 9 points, skipping over 0, 1, 2, and 3
vertices

It is interesting how an easy to describe algorithm like this, skipping around points on a circle, translates into a program.

The polygons on this page are drawn using some JavaScript (code here), which includes some use of trig functions to place the initial vertices (like points around a unit circle) and modular arithmetic to help traverse the list of points in a circular way. It's a nice example of how math makes its way into how we implement even simple algorithms.

When we go fully over to a mathematical way of expressing how to draw these by using desmos, we can see how mathematics can, in this case, express the algorithm in a surprisingly compact way. You can check out the graph here.

desmos sketch of {7/2},
graph here


Related links and posts
star polygon page
star polygons in desmos
polygons in the multiplication table

Wednesday, May 8, 2019

Desmos Chladni

Like Lissajous figures, Chladni figures provide a surprising and aesthetically engaging example of wave interaction.

Named for Ernst Chladni, these figures represent nodal patterns formed by vibrating surfaces. Traditionally, these are formed placing fine particles on a surface, like a sheet of metal that is set vibrating (a violin bow against an edge of the metal plate is one popular method). The particles settle in the areas of the surface that have the least motion - the nodes. When you achieve a resonant frequency, a characteristic pattern emerges.

In past posts I've pointed to code that draws Chladni figures using R (here and here), and using JavaScript. Maybe not surprisingly, you can also play around with Chladni-like figures using Desmos, and this may be the most accessible way to explore them them and appreciate how they are generated from the sinusoidal functions.

Chladni-like figure generated in R

Chladni-like figure generated using JavaScript


In Desmos, you can create images similar to these using inequalities. The equations are reasonably straight forward - the graph here will draw the figure across the whole plane - best results are seen when zooming in on a small region.

Chladni-like figure generated in Desmos,
graph here


More Chladni-like figures in Desmos

Try playing around with the desmos graph here, R scripts for generating figures are found here, the JavaScript Chladni generating page is here.

Update
After posting on Twitter, the desmos sketches were improved by   and @PaulaKrieg. Here are some other graphs inspired by their changes:

A Chladni-like pattern with
two distinct inequalities

A Chladni-like pattern with three distinct
inequalities

With the added layers, the Chladni patterns are approaching an abstract William Morris appearance.

Another Update
This other graph allows you to experiment more directly with the Chladni figures, similar to the web page mentioned above.

graph for building 
Chladni figures


Wednesday, April 17, 2019

why horizontal transformations are tricky

Both the Common Core and Ontario curricula ask students to look at families of functions that are connected to each other through simple transformations, and to build new functions from existing functions.

In Ontario as with the Common Core, students get an understanding of function families "by playing around with the effect on the graph of simple algebraic transformations of the input and output variables." In the Ontario curriculum (MCR3U), students spend a significant amount of time graphing complicated examples from a function family by relating them to transformed graphs of a simple base function.


The base quadratic (purple) and a transformed
member of the quadratic family.

When working on these these ideas with students, I've had to ask myself a few questions.

  1. What is a valid 'transformation' of the graph of a function, and how are these related to more familiar transformations of the plane?
  2. How are the transformations connected to the function definition?
  3. Why are horizontal transformations tricky? As noted in the Common Core progression document, "students may find the effect of adding a constant to the input variable to be counterintuitive, because the effect on the graph appears to be the opposite to the transformation on the variable."

Short Answers

Here are some short answers to those questions.

  1. The 'transformations' we want to restrict ourselves to are ones that preserve the main characteristics of the graph, these are a reduced set of the affine transformations of the plane: translation, scaling, and reflection. The transformations we want to consider do not include rotation, projection, or shearing. The simple transformations that are included are ones where the x and y coordinates do not 'interact' with each other (the original x value has no impact on the transformed y value, and the original y value has no impact on the transformed x value).
  2. It turns out that the transformations of the graph we want (simple affine transformations with no rotation or shearing) are obtained by pre-composition and post-composition of the parent function with single variable linear functions.
  3. Horizontal transformations are tricky because they are the result of pre-composition with the inverse of the linear function responsible for the horizontal component of the transformation. When we look at the complicated function and "read off" the transformations, it is akin to looking at linear function and reading off its inverse. 

Long Answer, with matrices and diagrams!

We often represent transformations of the plane using matrices. In this case, we would represent dilations, translations, or reflections like this:


There is no interaction between the x and y coordinates - no rotation or shearing. This results in a diagonal matrix, and allows us to represent the transformation as a pair of single variable linear functions.


If a function g is thought of as the result of this transformation applied to the points of the function f, then the diagram below commutes.


But in order to write g in terms of the transformation and f, we need to invert the part of the transformation that is operating on the x values.


And we can write g as:


Spelling this out with our formulas for the components of the transformation, we can see the messiness that results from composing with the inverse of our original transformation.


What to take away

It helps me to think along these lines, but is there anything here that may help when working on transformed graphs of functions with high school students?

I find that in presenting 'transformations of graphs' to students, we generally don't relate it back to  the transformations they learned about in elementary school, where they explored translations, reflections, dilations, ans rotations. It might be good to make stronger connections with that prior learning, noting that when transforming graphs within a function family, we only use dilation, reflection, and translation.

Function composition is a unifying and clarifying concept. Maybe it makes sense to talk about sooner than is generally done. It is surprising that in grade 11 we talk about inverse functions without exploring function composition. If you are willing to use function composition, you can use arrow diagrams to explore function transformations using a method like the one described here.

Looking more at inverses of linear functions may help provide a way to explain the strange backwardness of the horizontal transformations, even if the connection is not formally demonstrated.

References

The Common Core Standards Writing Team. (2013). Progressions for the Common Core State Standards in Mathematics (draft). Retrieved from http://commoncoretools.me/wp-content/uploads/2013/07/ccss_progression_functions_2013_07_02.pdf

Ontario Ministry of Education. (2007). The Ontario Curriculum Grades 11 and 12, Mathematics, Revised. Retrieved from http://www.edu.gov.on.ca/eng/curriculum/secondary/math1112currb.pdf

Related Post: understanding transformed functions with arrows

Monday, April 15, 2019

LaTeX for high school math teachers

TLDR: Please check out the online workshop I am developing for high school math teachers who want to learn about LaTeX. That this community needs  something like LaTeX raises questions about teaching and learning math in online situations.
I have been using LaTeX a lot recently, but not in the way I first used it a long time ago when writing my master's thesis. (Not sure what LaTeX is? Check out the first module of the online workshop here.)

Now I am using it daily to provide feedback to students in the LMS that I teach an online course in (Brightspace), include bits of math on webpages, and avoid the Google Docs equation editor.

With the inclusion of little bits of LaTeX in various digital platforms, the availability of cloud-based authoring systems like Overleaf, and the ability to include LaTeX on any webpage with MathJaX, LaTeX seems everywhere these days (once you start looking). It's not just the Baader-Meinhof phenomenon - the ubiquity of LaTeX is real, and a response to important problem with teaching and learning mathematics on digital platforms.

With the increasing use of digital technology and online learning in secondary schools, knowing a little bit of LaTeX can  help high school math teachers communicate effectively with both students and colleagues. Most LaTeX resources are aimed at researchers and grad students, and are not focused on the use of LaTex in these new situations. So, I am working on an short online "Introduction to LaTeX" workshop  for high school math teachers that focuses on the more on the specific uses that matter to them (please take a look, any feedback is appreciated).

LaTeX is great, but finding ways to get equations into documents do not address the essential challenges that these digital platforms raise for teaching and learning. High school teachers once used hand-written overheads, drew on blackboards, and scribbled in notebooks - now we share discussion posts, emails, and send documents back and forth in our LMSs. In these new digital forums, how do we show messy "live" examples of doing mathematics, rather than presenting an overly polished finished product?


Thursday, February 14, 2019

of words and frogs


Inspired by Lillian Ho's article on using origami with adult ESL learners (see references below), I decided to build a lesson for high school ESL students around the hopping frog model.

The basic activity went like this:
1. Students were shown how to fold the model without being given any verbal instructions. 
2. Students were given a version of the instructions with all written instructions removed. 
3. In groups of 3 or 4, students were asked to provide written instructions on chart paper to go along with the diagrams. 
4. The written instructions were shared by placing the chart papers up around the class, and students were asked to identify the important words that were used in the instructions. 
5. As a whole class, we folded the frog again, noting the mathematical ways we could describe each step.


If you try an activity along these lines, I expect that should be split over two or three sessions. We did step 1 at the end of another lesson, steps 2 and 3 on a second day, and steps 4 and 5 on a third day.

In thinking about the sort of descriptions that the students should be guided towards, it's helpful to note some of the observations provided in an article by Koichi Tateishi (see references): (1) the written words are not a replacement for the diagrams, but should be thought of as complementary, and (2) we should avoid technical origami terms (mountain fold, squash fold, etc.).

When one group of students uncovered a useful word, it would get written up on the board for all groups to share, so as we went we developed a list of helpful words. With reference to the steps on the instruction page, some words that the students used included or discussed at each step were:

step 1: paper, card, square, rectangle, fold, half, long, short, side, middle, open, line;
step 2: diagonal, top, side, edge;
step 3: do again, repeat, other side;
step 4: turn over, flip, corners, intersection, lines crossing;
step 5: push, pinch, squash, together, peak;
step 6: tip, up;
step 7: center, in, inwards;
step 8: flaps, outside, inside, arms;
step 9: bottom, nose, legs;
step 10: down, knees;

These words were used in the context of providing instructions and directions - a very important type of speech act that students are routinely confronted with.

In the appendix to her article on the benefits of origami lessons for middle school students, Norma Boakes (see references below) provides a great sample mathematical dialog for the jumping frog model (step 5 of our lesson plan). Like Boakes suggests, in our mathematical discussion we talked about rectangles, squares, quadrilaterals, right angles, bisectors, 45 degree angles, triangles, pentagons, right-triangles, parallel and perpendicular lines. Each (now very familiar) step of the frog construction providing a concrete model for the concept we were talking about.

Through this lesson, we learned and reviewed a lot of everyday language around the giving and receiving of instructions that involve everyday spacial terms, and were also able to then apply a mathematical lens to deepen our understanding of what we were doing.

References

Boakes, N.J. (2009). "The Impact of Origami-Mathematics Lessons on Achievement and Spacial Ability of Middle-School Students." In Lang, R.J. (Ed) Origami 4: Fourth International Meeting of Origami Science, Mathematics and Education. Natick, MA: A K Peters Ltd.

Ho, L.Y. (2002).  "Origami and the Adult ESL Learner." In Hull, T. (Ed.) Origami 3: Third International Meeting of Origami Science, Mathematics and Education. Natick, MA: A K Peters Ltd.

Tateishi, K. (2009). "Redundancy of Verbal Instructions in Origami Diagrams." In Lang, R.J. (Ed) Origami 4: Fourth International Meeting of Origami Science, Mathematics and Education. Natick, MA: A K Peters Ltd.