Skip main navigation

Flexagonator and its programming language

Yossi Elran explains how to use flexagonator and its programming language
Full pat notation
© Davidson Institute of Science Education, Weizmann Institute of Science

It’s time to meet flexagonator – Scott Sherman’s program for creating and flexing triangle-based flexagons, online. Open a new tab with Flexagonator.

The screen is divided into four sections. The top section is where you create flexagons and flex them using the commands we just learned in the previous step. The instructions are entered on the right. The two main faces of the flexagon appear on the left. You can switch between them by pressing the ^ button on the small, “back” side.

The second section is where you create flexagons using a full computer script. This means that there is a whole language where you can describe what you want to make and what you want to flex with much more flexibility.

The third section creates the flexagon templates – with a bunch of labeling options.

The last section is where you can explore the flexagons that you create!

Now, let’s look at the top section. This is quite easy to understand – and if you get lost, you can always press the “What is this and how do I use it?” button on the top left-hand side of the screen.

  • Generating sequence: this is where you input the flexes you want your flexagon to do. If you want a flexagon that just pinch flexes, you just write P* or P+ and that’s what you get! The difference between * and + is subtle – we’ll get to that in just a moment.
  • Search flexes: a list of flexes. Whatever flexes you write here will appear as buttons on the image of the main face of the flexagon on the left, that, when pressed, perform the flex.
  • Pats per side: The number of pats on the face, for example, 6 will give you a hexaflexagon, 7 a heptaflexagon, and so on.
  • Center angle: the angle of one triangle at the center of the flexagon. For equilateral triangles, this is 600.
  • Angle 2: the second angle if the triangle is not equilateral. The third angle is of course deduced, given that the sum of the angles must be 1800.

Let’s give it a try, shall we?

Input the following generating sequence: P+. This will make a pinch flex the only flexagon. It’s always advisable to write all possible flexes in the “Search flexes” box. Even the default is not an exhausted list, so, you can copy and paste this list:

P P44 P55 P66 P333 P334 P444 P3333 Tw T T1 T2 T3 Tf Ttf Sh V F St Tk Ltf Ltb Lbf Lbb Lh Lk L3 P’ P44’ P55’ P66’ P333’ P334’ P444’ P3333’ Tw’ T’ T1’ T2’ T3’ Tf’ Ttf’ Sh’ V’ F’ St’ Tk’ Ltf’ Ltb’ Lbf’ Lbb’ Lh’ Lk’ L3’

Sometimes, you’ll find more flexes than the flexes you asked to generate. This happens when the minimum structure needed for the flex you asked to generate can support some of the other flexes you asked to search for. This is not the case for the pinch flex structure we’re about to generate.

First, we’ll make a tri-hexa-flexagon, the simplest triangle-based flexagon. Enter 6 as the number of pats per side, and change the center angle to 60. Since all the angles are the same in this tri-hexa-flexagon, there’s no need to enter a second angle.

Now, just press: Apply settings. The main face of the tri-hexagon will appear on the left, along with the pinch flex buttons in the three possible places. The other side appears just below to the right of the larger flexagon. You can switch sides, by pressing the ^ button on the smaller flexagon. The inner structure of the flexagon is notated on the outside of the sides using pat notation (remember?). In this case, there are two inner structures, three single leaf pats, notated “-“, and three 2-leaf pats. notated [- -]. The main hinge – that with which the flexagon was created to flex through – is notated with an asterisk. With this simple flexagon, this doesn’t really matter, but with more complex structures, it does.

Pinch flex through the 3-face cycle of this flexagon!

* vs +

Suppose you want to create a flexagon that can perform two consecutive pinch flex around the main hinge. You want to tell flexagonator to make a structure with a pinch flex, that, when applied again, can be pinch flexed again around the same hinge. Note that with the simple tri-hexa-flexagon that you just made this cannot be done because the position of the hinge alternates after every flex. To tell the program to make a flex and apply it (theoretically), you add an asterisk after the flex, like this: P*.

So, an asterisk after a flex means create the structure to support the flex and apply it (theoretically) and a plus sign means to create the flex without applying it. By “theoretically” I mean that the program doesn’t show you the flexagon after the flex is applied, it just creates the structure that can support actually doing this. For structures generated for single flexes, there is no difference between * and +, so for the tri-hexa-flexagon you just created, you could have written P*. But, for a structure that supports two consecutive pinch flexes around the same hinge you have to write: P* P*. Try it out!

When you do this, you’ll get a 12-leaf flexagon. When you press the P next to the main hinge (denoted by *), you are able to pinch flex again from the same position. Also note, that this flexagon supports many other flexes as well. Contrast this flexagon with one that supports two pinch flexes without applying them by using this generating sequence: P+ P+. You’ll get the regular 9-leaf tri-hexa-flexagon again.

Flex sequence and show current script

Instead of pressing the flex buttons on the flexagon, you can write down a sequence of flexes in the box below the flexagon. These flexes are applied one after the other in sequence, around the main hinge. With the P* P* generated flexagon, you can perform: P V St to replace the green number 2 back face, with a purple number 4 one!

When you press “Show current script” you get the “hard core” programming language – that is yet another way to generate and flex flexagons. The full programming language is beyond the scope of this course, but if you’re interested you can learn it here. Instructing flexagonator to create and flex flexagons using this language, instead of the buttons in the top section, is what you can do in the second section.

 

© Davidson Institute of Science Education, Weizmann Institute of Science
This article is from the free online

Flexagons Galore: Advanced Flexagon Fun

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now