## Discrete Functions Gone Wild!

March 27th, 2013 by Dan Meyer

*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.

**Featured Comments**

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?

on 27 Mar 2013 at 2:34 pm1 Dan MeyerHint: check out what happens when you connect the vertices of the 3.5-gon. Anything?

on 27 Mar 2013 at 2:38 pm2 Rosaleen HealySo 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?

Please enlighten

on 27 Mar 2013 at 2:40 pm3 Rosaleen HealyPossibly stupid again but when you connect the vertices aren’t you just making external diagonals of a concave polygon??

on 27 Mar 2013 at 2:43 pm4 Mike LawlerThis is really cool. Can’t wait to show this to my kids when I get back from a work trip this weekend!

on 27 Mar 2013 at 2:59 pm5 Ross ChurchleyThe 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!

on 27 Mar 2013 at 3:04 pm6 josh 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

on 27 Mar 2013 at 3:47 pm7 EricHere’s a link to a desmos graph you can use to play with this:

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

on 27 Mar 2013 at 4:21 pm8 DonI 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…

on 27 Mar 2013 at 4:27 pm9 Marc GarneauHere’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

on 27 Mar 2013 at 4:34 pm10 Stuart PriceI 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

on 27 Mar 2013 at 4:35 pm11 3.5 sided polygons? – pushing the boundaries of definitions… | lttmaths[…] DISCRETE FUNCTIONS GONE WILD! […]

on 27 Mar 2013 at 4:47 pm12 Marc GarneauI 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.

on 27 Mar 2013 at 6:41 pm13 PhillWhat 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.

on 27 Mar 2013 at 6:44 pm14 PhillLooks like Stuart already posted something like that. Neat stuff!

on 27 Mar 2013 at 7:35 pm15 WilsonReally love the fun of this sharing! Thanks Dan for the lucid writing, I have made dydan my math textbook.

on 28 Mar 2013 at 2:49 am16 Dan MeyerMany, many thanks to

Marc Garneau, Eric Berger, Stuart Price, and Josh Giesbrechtfor volunteering some coding service here. I’ve boosted their contributions to the main post.on 28 Mar 2013 at 7:20 am17 James McKeeStumbled 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……

on 28 Mar 2013 at 8:17 am18 Matt EHere’s one where you can adjust the numerator & denominator independently: http://ggbtu.be/m33820

on 28 Mar 2013 at 8:20 am19 DrewDRosaleen H.

To your question:

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.

on 28 Mar 2013 at 8:53 am20 James KeyI 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.

on 28 Mar 2013 at 4:56 pm21 Steve PhelpsI might be late to this party, but here is my contribution: http://www.geogebratube.org/material/show/id/33858

on 28 Mar 2013 at 5:49 pm22 Elaine WatsonWow! 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!

on 28 Mar 2013 at 8:15 pm23 Andrew AlexanderHere’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

on 29 Mar 2013 at 6:20 am24 timstudiesmathIt appears Khan had one too: http://www.khanacademy.org/cs/star-creator/823072130

on 29 Mar 2013 at 8:07 am25 What does a regular 3.5-gon look like? | WatsonMath.com[…] 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 […]

on 30 Mar 2013 at 5:25 am26 DannyHmmm, 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?

on 30 Mar 2013 at 3:23 pm27 timstudiesmathFor Danny:

http://www.geogebratube.org/material/show/id/33958

For Dan (one interpretation):

http://www.geogebratube.org/student/m33865

on 31 Mar 2013 at 9:37 am28 l hodgeWould 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.

on 02 Apr 2013 at 2:27 am29 DanielSo, 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?

Please enlighten me!

on 02 Apr 2013 at 3:46 am30 Matt EOh 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…)

on 02 Apr 2013 at 7:57 am31 George BDaniel, 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??

on 02 Apr 2013 at 9:16 am32 MattThe 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.

on 02 Apr 2013 at 10:39 am33 Dan MeyerI tossed

MattandDaniel’scomments up to the main post. Provocative stuff, everybody.on 03 Apr 2013 at 2:32 pm34 Michael SerraBeing 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.

on 03 Apr 2013 at 2:39 pm35 Michael SerraBTW: 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.

on 03 Apr 2013 at 4:57 pm36 Elaine WatsonIs 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!

on 04 Apr 2013 at 9:22 am37 Julie ConradMichael,

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!

on 06 Apr 2013 at 8:20 pm38 Eric JablowIn 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}.

on 08 Apr 2013 at 7:27 am39 Marvelous #Math Monday 04-08-13 | Joy of Education[…] 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 […]

on 08 Apr 2013 at 9:02 pm40 Star 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 […]

on 11 Apr 2013 at 11:17 am41 Michael SerraIf 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.

on 12 Apr 2013 at 6:01 am42 Elaine WatsonMichael,

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

on 11 Jul 2013 at 11:54 am43 Geogebra Applet I made for visualizing sequences of inscribed regular polygons | Geometry Blog[…] due credit to Marc Garneau, whose work I stole and […]

on 27 Oct 2013 at 2:23 pm44 hugh duncanDan,

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?