## Discrete Functions Gone Wild!

a/k/a What does a regular 3.5-gon look like?

Functions come in discrete and continuous families, which are something like the Montagues and the Capulets. Very little in common. Sometimes angry with each other.

Continuous functions tell you something about the real numbers. A function that converts from Fahrenheit to Celsius is continuous because it'll tell you Celsius for any value of Fahrenheit, including decimals, rationals, irrationals, any real number.

Discrete functions, meanwhile, only tell you something about sets of numbers you can count — the whole numbers, for one example. The function that tells you what your tax credit is for the number of kids you have is discrete because it won't give you a credit for your fractional 2.34 children.

Another discrete function is the one that takes the number of sides of a regular polygon and tells you the measure of one of its inner angles. A regular triangle has three sides and its inner angle is 60 degrees. A regular quadrilateral has four sides and its inner angle is 90 degrees. A regular pentagon has five sides and its inner angle is 108 degrees.

That's a recipe for a regular pentagon right there. Draw a 108 degree angle between two segments with the same length.

Then draw another 108 degree angle on the last segment.

And another, and another, until the segments reconnect and you have a regular polygon with five sides.

We can write a table:

We can graph those values:

We can also write an equation:

That equation perfectly describes the discrete values in that graph. But the equation is stupid. It doesn't know it's only supposed to describe those discrete values. We can put in other values and, like a sucker, it'll give us a number, even though it isn't supposed to and even though that number won't make any sense.

Like n = 3.5. A regular polygon with 3.5 sides? No such thing. But if we throw n = 3.5 into that function, it gives us the number 77.1 degrees.

Maybe that's just gibberish, the result of pushing this function machine beyond its warranty. But maybe it isn't.

What if we tried to draw a regular 3.5-gon in the same way we did the regular 5-gon up there?

We'd lay down a 77.1 degree angle.

Then another on top of that one.

Then another. And another. And another. And another. And one more. And we're back where we started.

Blam. The regular 3.5-gon exists!

So different representations of functions (the table, the graph, the polygons, the equations) show and reveal different features of the function. Sometimes they reveal dirty, interesting secrets. The domain of the function — the part that says, "I only work with discrete numbers." — is like a product warranty. But warranties were meant to be voided. Push your way past the warranty, hack away, find something interesting, and show it off.

BTW. One of you enterprising programmers should create the animation that runs through continuous values of n and shows the regular polygon with that many sides. That'd blow my mind. I can only do the discrete values.

BTW. Malcolm Swan demonstrated the 3.5-gon on the back of some scratch paper in the middle of a design session here in Nottingham. That kind of throwaway moment (often before tea, of course) has been a lot of fun these last two months.

BTW. But where is the 3.5 in that shape? Maybe you see how the number 3.5 turned into the number 77.1 and how the number 77.1 turned into that star shape. But where is the 3.5 in the star? I'll hint at it in the comments but I'll encourage you to think this through. (It may be helpful to see 3.5 as the rational number 7/2.)

2013 Mar 28. I love you guys. I fall asleep for a few hours and wake to find out it's Christmas. Some interesting visualizations of rational regular polygons from Marc Garneau, Eric Berger, Stuart Price, and Josh Giesbrecht.

2013 Mar 29. More applets. One from Andrew Alexander and the other from Khan Academy.

So, we can now draw a p/q-gon for any natural p,q. Does it allow us to run continuously through polygons? what about irrational number (so many of them between any two rationals…). To make it really continuous we need to have polygons for them as well. According to the above construction, I don’t thing that is possible because an irrational polygon will never meet its starting point (if it will, it will contradict its irrationality).

Matt:

The visual math discovered is cool, but what I’m really amazed by is the fact that the online math ecosystem allowed people to quickly create interactive visual demos in at least five different free, visual environments! Scratch, Desmos, Geogebra, Logo, and Sage. (JavaScript might be a sixth, though Andrew’s nice JavaScript demo wasn’t created within a visual tool, and KA’s JavaScript demo was pre-existing.)

Isn’t that just awesome?

### 45 Responses to “Discrete Functions Gone Wild!”

1. on 27 Mar 2013 at 2:34 pmDan Meyer

Hint: check out what happens when you connect the vertices of the 3.5-gon. Anything?

2. on 27 Mar 2013 at 2:38 pmRosaleen Healy

So confused now!
I was thinking isn’t that great and aren’t they brilliant…….
As it is and I am sure you are
BUT PLEASE tell me, aren’t polygons based on the number of external ‘walls’ and isnt that shape you made concave and so it can’t by definition be a regular polygon?

3. on 27 Mar 2013 at 2:40 pmRosaleen Healy

Possibly stupid again but when you connect the vertices aren’t you just making external diagonals of a concave polygon??

4. on 27 Mar 2013 at 2:43 pmMike Lawler

This is really cool. Can’t wait to show this to my kids when I get back from a work trip this weekend!

5. on 27 Mar 2013 at 2:59 pmRoss Churchley

The function F(x) whose output is the number of sides in an “x-gon” isn’t continuous in the technical sense. I won’t give it all away, but F has a vertical asymptote wherever x is an irrational number!

6. on 27 Mar 2013 at 3:04 pmjosh g.

Ok, kind of quick since I’m at my in-laws and they’re eating amazing baking right now while I’m being an idiot and coding something.

But, here you go.

http://scratch.mit.edu/projects/MrGiesbrecht/3214571

7. on 27 Mar 2013 at 3:47 pmEric

Here’s a link to a desmos graph you can use to play with this:

https://www.desmos.com/calculator/xot4qkoi5b

8. on 27 Mar 2013 at 4:21 pmDon

I just noticed this on the TI-nspire an hour ago. I was trying to make a regular polygon using the regular polygon function. There was a fraction in gray when I tried to size the polygon. When I left it a fraction, the polygon was concave. When it was a whole number, the polygon was convex.
Thanks to you, this makes so much sense as to why…except why TI programmed this to do this…

9. on 27 Mar 2013 at 4:27 pmMarc Garneau

Here’s a Geogebra version. I had fun playing with it to create it. Ultimately it comes down to one sweetly complex Sequence expression.
http://www.geogebratube.org/material/show/id/33761

10. on 27 Mar 2013 at 4:34 pmStuart Price

I knew Logo would come in handy one day. Change the value of the variable ‘den’ (denominator). Script runs through all numerators from 3*den to 8*den. http://bit.ly/14pkxBI

11. [...] DISCRETE FUNCTIONS GONE WILD! [...]

12. on 27 Mar 2013 at 4:47 pmMarc Garneau

I found a much simpler way, and the Geogebra file’s been updated. The Sequence command is no longer sweetly complex, because it didn’t need to be.

13. on 27 Mar 2013 at 6:41 pmPhill

What if instead of linear sequences, such as {2.0, 2.1, 2.2, …}, as input to the n-gon function, you could pick a constant integer c and the input sequence was more like {c/1, c/2, c/3, … }? I wonder if the changes in n-gon shape would look more continuous.

14. on 27 Mar 2013 at 6:44 pmPhill

Looks like Stuart already posted something like that. Neat stuff!

15. on 27 Mar 2013 at 7:35 pmWilson

Really love the fun of this sharing! Thanks Dan for the lucid writing, I have made dydan my math textbook.

16. on 28 Mar 2013 at 2:49 amDan Meyer

Many, many thanks to Marc Garneau, Eric Berger, Stuart Price, and Josh Giesbrecht for volunteering some coding service here. I’ve boosted their contributions to the main post.

17. on 28 Mar 2013 at 7:20 amJames McKee

Stumbled across this one this morning getting ready for geometric sequences:

For the sequence 8, -4, 2, -1, …..

A(n) = 8 * (-.5) ^ x

This function only seems to be defined for integer values, since we (or should I say “I”) don’t have a definition for rational exponents of negative numbers.

Haven’t gotten very far into the implications yet……

18. on 28 Mar 2013 at 8:17 amMatt E

Here’s one where you can adjust the numerator & denominator independently: http://ggbtu.be/m33820

19. on 28 Mar 2013 at 8:20 amDrewD

Rosaleen H.

http://en.wikipedia.org/wiki/Regular_polygon#Regular_star_polygons

The classical study usually only considers simple polygons which do not intersect. I assume that this is because ideas like interior and exterior are not easily defined if you look at a polygon that is not simple.

20. on 28 Mar 2013 at 8:53 amJames Key

I look at Marc’s geogebra applet — very cool. Try setting n=5.1, for example, and notice that there appears to be a circle forming in the interior of the figure. (I remember doing a sewing project in elementary school that resembled this beautiful diagram.) I’m intrigued by this — I wonder what interesting mathematics might come of trying to understand that circle.

21. on 28 Mar 2013 at 9:45 amDan Drake

Here’s a Sage version. Type in your own floating-point number:

I’m a fan of the regular 3.99-gon.

22. on 28 Mar 2013 at 4:56 pmSteve Phelps

I might be late to this party, but here is my contribution: http://www.geogebratube.org/material/show/id/33858

23. on 28 Mar 2013 at 5:49 pmElaine Watson

Wow! I love math! I was blown away by this post and the idea of thinking of a 3.5 gon as a 7/2 “gon” that means that it has seven “sides” and takes two rotations to complete. I taught high school math a long time and never ran into this idea. Was I missing something? Or has technology allowed us to visualize these things and now we can make sense of them? I’m already thinking up an investigative lesson where students look at the name of the n-gon in decimal form, turn it into fractional form, predict how many sides and how many rotations it will take to complete, and then watch one of those awesome visualizations that Marc Garneau, Eric Berger, Stuart Price, and Josh Giesbrecht offered up to validate their guess. It would be as exciting as seeing Act 3! …and would force them to use their fraction sense to boot!

To top it off, your mention of Malcolm Swan took me off on another tangent of googling him and re-discovering http://www.toolkitforchange.org, which will keep me busy for a long time.

Thanks, Dan, for a great, thought-provoking post! You must be having a ball in Nottingham!

24. on 28 Mar 2013 at 8:15 pmAndrew Alexander

Here’s another—written directly in Javascript in the browser, and it produces beautiful vector graphics that print/zoom at high resolution! http://andrusia.com/xgon.html

25. on 29 Mar 2013 at 6:20 amtimstudiesmath

26. [...] when I thought I had no more to learn and discover about regular polygons, Dan Meyer draws me back in and wows me.  Once I know that the sum of the angle measures is (n-2)*180 and, if [...]

27. on 30 Mar 2013 at 5:25 amDanny

Hmmm, what would happen if you instead made the 3.5-gon by making 3 sides of length one and the 4 side of half the lenght? Could that work? What would the angles look like?

28. on 30 Mar 2013 at 3:23 pmtimstudiesmath

For Dan (one interpretation):
http://www.geogebratube.org/student/m33865

29. on 31 Mar 2013 at 9:37 aml hodge

Would you say that this is really a pair of 3.5-gons? Do 3.5-gons only come in pairs?

A nice six pointed star can be made by laying a rotated version of a triangle on top of itself. Same idea for an eight sided star. So how do you lay a rotated version of a 3.5-gon on top of itself?

The “first” three segments of the 3.5-gon could be viewed as three sides of an incomplete polygon. Trace the next three sides with a different color and you will get a rotated version of the first three lines. These two partially completed polygons almost make a star. Instead of using two polygons to make a star, we used two partially completed polygons which then shared the 7th and final side to make the star.

30. on 02 Apr 2013 at 2:27 amDaniel

So, we can now draw a p/q-gon for any natural p,q. Does it allow us to run continuously through polygons? what about irrational number (so many of them between any two rationals…). To make it really continuous we need to have polygons for them as well. According to the above construction, I don’t thing that is possible because an irrational polygon will never meet its starting point (if it will, it will contradict its irrationality).
So in this case I don’t think we can talk about a limit point of a series of “rational polygons” converging to an irrational one, or can we?

31. on 02 Apr 2013 at 3:46 amMatt E

Oh now THAT’S interesting, Daniel… for example, if we wanted to think about a sqrt(13)-gon, could anything be revealed by looking at the rational polygons corresponding to the continued-fraction convergents of sqrt(13)? (For the record, they are 3, 4, 7/2, 11/3, 18/5, 119/33, 137/38, 256/71…)

32. on 02 Apr 2013 at 7:57 amGeorge B

Daniel, good questions. The rational numbers are continuous, its a paradox that it also has holes (irrational numbers.) But as to your question about whether there could be an irrational version of these… I think the answer is no for the reason you stated, the curve will never reach the starting point (which was implicitly taken to be the stopping point), therefore the curve is not closed, and a “polygon” is defined as being a closed curve. However, its still a fascinating question as to what kind of “thing” such a curve would be. It seems like it would be a space filling curve, but would it “fill” a disk? or would it have some kind of fractal irrational dimension??

33. on 02 Apr 2013 at 9:16 amMatt

The visual math discovered is cool, but what I’m really amazed by is the fact that the online math ecosystem allowed people to quickly create interactive visual demos in at least five different free, visual environments! Scratch, Desmos, Geogebra, Logo, and Sage. (JavaScript might be a sixth, though Andrew’s nice JavaScript demo wasn’t created within a visual tool, and KA’s JavaScript demo was pre-existing.)

Isn’t that just awesome?

We should take this case (non-integer-gons) and start to build a set of Rosetta Stone cases, showing how you could handle each case in those different tools.

34. on 02 Apr 2013 at 10:39 amDan Meyer

I tossed Matt and Daniel’s comments up to the main post. Provocative stuff, everybody.

35. on 03 Apr 2013 at 2:32 pmMichael Serra

Being a geometry geek I at first passed up this post of Discrete Functions. But just happened to notice polygons being formed at the bottom of the page and was tickled to see star polygons being formed in a new way. VERY COOL.
Aside from the cool mathematics, I have to say Dan, your text is very engaging and quite descriptive.
“the Montagues and the Capulets” , “the equation is stupid. It doesn’t know it’s only supposed to describe those discrete values. We can put in other values and, like a sucker, it’ll give us a number, even though it isn’t supposed to and even though that number won’t make any sense.” , “the part that says, ‘I only work with discrete numbers.’ — is like a product warranty.” Wonderful.

36. on 03 Apr 2013 at 2:39 pmMichael Serra

BTW: Expressing the n as an improper fractions opens the door to two ways of expression each star polygon. The star polygon 12/5 is equivalent to the star polygon 12/7. The numerator expressing the number of vertex points and the denominator expressing how many points to count from one vertex to the next vertex.

It is cool that Elaine Watson noticed that the denominator is also the number of cycles to complete the star polygon. I hadn’t seen that before.

37. on 03 Apr 2013 at 4:57 pmElaine Watson

Is this THE Michael Serra, author of Discovering Geometry, one of my favorite HS math textbooks?

I’m new to this 3.5-gon stuff. I was just trying to make sense of the numbers and how they related to the resulting shape. I’m honored that I “discovered” something that the author of Discovering Geometry did not discover!

38. on 04 Apr 2013 at 9:22 amJulie Conrad

Michael,

I hadn’t noticed the points to count from one vertex to another but by doing so, we can begin to see the connection to combinations and pascals triangle. You’ve given something for me to do on my trip to Denver to explore this further. What a wonderfully rich problem…and amazing discussion thread.

Keep ‘em coming, Dan!

39. on 06 Apr 2013 at 8:20 pmEric Jablow

In general, regular polytopes can be described by their Schläfli symbol. A regular n-gon has symbol {n}. A cube has symbol {4, 3}, meaning it has square sides, and 3 sides at each vertex.

Where a polytope has a star-polygon for a face or the way they surround a vertex, one uses the appropriate fraction. The 3.5-gon has symbol {7/2}.

40. [...] High School Polygons: Want to give your precalc students a challenge with polygons? Check out Dan Meyer’s n-gon blog post which shows the progression for discovering what a “regular 3.5-gon” looks [...]

41. on 08 Apr 2013 at 9:02 pmStar Polygons Take 2 | WatsonMath.com

[...] all started with Dan Meyer’s March 27, 2013 post “Discrete Functions Gone Wild!” His post focused on what  a regular polygon would look like when when the number of sides was not [...]

42. on 11 Apr 2013 at 11:17 amMichael Serra

If you are interested in having your students discover patterns with star polygons I’d suggest starting with a simple set of examples of star polygons (5/2), (7/4), and (6/2). Then give your students a blank table to fill in with sketches of star polygons. As they fill in the 8.5×11 page with n running from 3 to 9 in the left column and k running from 1 to 6 across the top, sit back and enjoy watching them discover the symmetry in the table.

I’d follow that lesson with a follow up lesson asking them to find the sum of the measures of the angles at the star points, generalizing for each k and finally for all (n/k). With the experience of the first table they can cut their explorations in half and be able to generalize.

43. on 12 Apr 2013 at 6:01 amElaine Watson

Michael,

Love your suggestion. I’m going to try it! Thanks!

44. [...] due credit to Marc Garneau, whose work I stole and [...]

45. on 27 Oct 2013 at 2:23 pmhugh duncan

Dan,

just read your 3.5-agon article. I first read about such rational polygons as 7/2 some years ago in ‘regular polytopes’ by Coxeter published 1974, though like you I had also discovered them myself just by wondering what would happen if one applied the rules to a non-integer example. Do you know who first came up with the idea of rational polygons?