Tuesday, September 20, 2016

octagonal star and monster tilings

Regular octagons can be placed edge to edge so that their centers lie on the vertices of a square.


These form a nice tiling of octagons and squares (a semi regular tiling):


Regular octagons can also be placed edge to edge on the vertices of a larger octagon by skipping an edge - this leaves a star in the center.

These rings of octagons also fit together nicely, leaving those square gaps, so we see both the 4-rings (whose centers are squares) and the 8-rings (whose centers are eight-pointed stars).


In a couple of posts a while back (here and here), there is a rule that describes how copies of the same regular polygon can fit into rings like these. I have been playing around with these, noticing that there are rules for which rings can be imposed on regular tilings, and that sometimes you can make rings of regular polygon rings.

Another nice way that polygons can fit together is around a fused polygon, also sometimes called monsters (thanks to Kepler - see Craig's comment to this post). Just as regular pentagons may be placed around the vertices of a monstrous fusion of two decagons (as in the Kepler pentagonal tiling), octagons can be placed around the vertices of a monstrous fusion of two octagons.


These double rings of octagons also fit together reasonably nicely, in a way that also includes the 4-rings, 8-rings, and another ring-around a monstrous fusion of four octagons.


Here are the stars and monsters in this pattern:

Of course, you might consider making a ring of rings around monsters:



Wednesday, September 14, 2016

islamic geometric patterns of Eric Broug


based on Kairouan Mosque pattern (p. 30)

I first heard about Eric Broug's work from a post by Alex Bellos, mentioned here. Alex provided a set of instructions by Eric that showed how to construct a design like the one below.

similar to Mosque of al-Nasir Muhammad,
but on a square grid instead of hexagonal (p. 82)

I was reminded of Eric's work after playing around with sliceformstudio, and ordered a copy of his book Islamic Geometric Patterns. It provided exactly the sort of instructions I was looking for, and has been a lot of fun to play with - the page numbers in the image captions of this post refer to that book. 

These are pure straight-edge and compass constructions and building up the elaborate designs using just those tools is key to appreciating their structure.  As a preamble, the book provides a quick overview of some standard ruler and compass constructions that may or may not be familiar to you, depending on when and where you learned school geometry. As pleasurable as it is to produce the patterns the old fashioned way (although not quite the authentic way: the original artists may have only had rope, rather than a standard geometry set), the desire to make larger versions of the patterns may prompt you to reach for more contemporary tools. Using geometry software, you can more easily explore and apply the techniques that Eric describes for drawing the thick interwoven lines that are characteristic of the art form, but that are difficult to do with pencil and paper.


applying some line drawing techniques (p. 22)

Rotating copies of the tile on the top right (medium sized lines), constructed in GSP using instructions from the book, I was able to make my own coloring page of the Kairouan mosque tile. (See also this earlier attempt at celtic knot tiles, that weave in a similar way.)

another view of Kairouan Mosque pattern (p. 30)

Rooted in an ancient tradition and found at culturally important sites, these patterns will, for some, have an aura of significance that stands apart from their geometric beauty. Although Eric's book pays tribute to those traditions, making these patterns understandable and reproducible may, in some sense diminish that aura; but if something is lost, something more is gained. In explaining, popularizing and providing the means of participating in the creation of these patterns, a tradition is both remembered and transcended. Rather than sacred and mysterious, I prefer my geometry to be rational and accessible - just as it is in Eric's instructions.

Friday, August 12, 2016

Monty R and Monty n

As part of my ongoing attempt to learn the R language, I decided to try to generate a data set to analyze in R using R itself. I wrote a  little R script which generates simulated data for a thousand trials of the "Monty Hall" problem. The script is here, along with other R examples.

If you source the script, a data frame MontyHall will be populated. The data is re-generated each time you source the script, so if you want to capture a single run, you should export the data and work from that (a saved example run is here, and contains the data  I used in this post).
In the classical Monty Hall problem, a game show host, named Monty Hall, presents a contestant with three (3) doors. Behind one of the doors is a valuable prize, traditionally a car, while behind the others are dud prizes, traditionally goats. A game proceeds with the contestant selecting a door and keeping the prize that lies behind it (hoping for the actual prize, not a dud). However, instead of opening the selected door, Monty opens one of the other two doors, revealing a goat, and asks if the contestant would like to switch and select the remaining door instead. The problem asks which choice has the higher probability of revealing the actual prize, or whether both options have the same probability of achieving the hoped-for outcome.
In this simulation, we have the contestant choosing to switch half of the time, hopefully generating enough cases so that the experimental probabilities (from the simulation) match up with the theoretical probabilities that we can come up with by analyzing the problem. (You can increase the number of trials by modifying the script).

The simulation gives us a data set that looks like this.


Our simulation has the probability of switching set to 1/2, as if we were basing our decision on the flip of a fair coin.

We can see that our simulation is pretty close:


We would expect that the probability of the contestant selecting the winning door right away would be 1/3, and this is what we see in the simulation.


All that this tells us is that R is generating random numbers in a reasonable enough way for our purposes. What makes the Monty Hall problem interesting are the probabilities of winning when the contestant switches doors, compared to when they don't switch.

If the contestant does not switch, their chance of winning is the same as their chance of selecting the prize right away, which is just 1/3.

This is not the result that some people expect (some argue that the chance of  winning when staying with the original selection should be 1/2), but the simulation agrees:


When the contestant makes their initial selection , they have either won or lost. Switching amounts to trading a win for a loss: if the contestant has picked the winner, they have now switched away from it; if they have picked a looser (one of the goats), when Monty opens the other door (revealing the other goat), switching will cause them to win. So, switching amounts to trading a win for a loss or a loss for a win. Because the probability of losing on the initial door selection is 2/3, it is a good idea to switch: the first choice was likely a goat.
And the simulation agrees:


What about if we pursue the strategy of the imaginary contestant in our simulation, and flip a coin to decide whether we switch doors or stay with the original choice? The law of total probability tells us that we have a probability of winning equal to 1/2.


And in the simulation we come pretty close:


Monty n

While writing up the R simulation, I wondered what would happen if the Monty Hall problem was generalized to n doors so that Monty could keep on offering you more chances to switch. There are likely many ways of doing this, so I picked what I think is a simple generalization:

Suppose that the contestant has n doors to choose from where n > 2. There is still only one (1) car (and n-1 goats). After a door is selected, Monty will always open a remaining door and provide the contestant with a chance to switch doors, as long  as there remain unopened doors that have not been previously selected by the contestant. Monty will not open doors that were previously chosen, nor will he give the contestant the opportunity to switch back to a previously chosen door.

I've put a short write up of this on ShareLatex here. At least in the way that I've framed the problem, there is a nice formula for the probability of winning on n doors if you switch k times:


Or if you prefer a direct formula instead of recursive:


If you work out some values using your preferred version of the formula, you should  get results that agree with these:


From this, or from the formulas themselves, you can see that the probability of winning keeps increasing as long as you keep switching doors as long as Monty gives you the option to.

I did not simulate the n > 3 case using R, but I did write a general simulation using Java (a listing for this is included in the write up here), and found that the simulation results agreed the the theoretical probabilities pretty closely (I have not carried out a detailed analysis of the results).


Thursday, August 4, 2016

Chladni on Google Books

While doing some light research a short while back (for this post), I hit a minor impasse: the Google Books scans of some figures in an early edition of  Ernst Chladni's book on sound were sadly obscured by folding.


Although I was able to find other digital images of similar scans, I sent in a support request to Google Books, and was surprised when within less than two weeks they had re-scanned the images, properly folding out the pages.

These and other nicely restored images can be found towards the end of the book.

Sunday, July 17, 2016

a first slice

Here is my first simple attempt at a geometric design using sliceformstudio - I'm looking forward to trying out many more.


I have played around a bit with sliceforms before, using instructions from John Sharp, who has written quite a bit about using them for creating models of conic sections and surfaces, and has a nice short blog post here about their history. I learned about sliceformstudio a short while ago from mathmunch.

This design was based on a simple pattern of pentagons around a decagon, to which the wondrous sliceformstudio applied some interweaving that I tweaked only slightly using the very simple interface.


After printing off the generated strip file onto cardstock, 10 long strips and 10 short strips are cut, folded, and slid together to create the final model. I've copied the generated strip file to a pdf here.

Update: I got some helpful feedback from the developer of sliceformstudio:
One tip - you could make each line segment straight by manually adjusting the contact angle of the patterns in the decagon and the polygon to match each other. Or you could use the Optimize feature to do the same - see video demo here. If you want the physical model to have straighter lines, thicker cardstock will also help!