Making the Braided Galton Board

Here’s the process for making the wire & bead Galton boards.

First up, cutting the wire to length. I screwed two wood screws right into the bench, then wrapped the wire back and forth till I had a bundle of 64.

wire measuring.JPG

Don’t cut the wire yet. Instead, wrap a length of copper around all the wires near one end. That’ll be the head of the display. Now all the wires are safely cinched at one end, you can cut them all at the other end. We now have 64 wires in a sort of ‘cat-of-nine-tails’ arrangement.

I used the same layout trick to make a bunch of little lengths to act as as the ties. A paint tin was about the right circumference. No idea how many I cut of these. Many?

wire for ties v01.jpg

Then, I used the lasercut frames to hold the Perler beads in place while they were being threaded. A red bead is used to separate the two sections, and also as something to tie the copper off on at the end.   threading jig v01.JPG

Oh yeah, huge tip here I almost forgot to mention. Put masking tape on the bottom of the bead frame. That stops the beads from  rolling away or getting knocked loose before you’ve finished threading them.

I think I decided it would be too fiddly to do all 64 at once, so I broke it up into groups of 16:

midway point v01.JPG

At this stage I questioned my sanity, and whether it was worth it. Thankfully I persevered. Deep breaths were needed.

Another useful trick was to tie off the first two steps of the sequence (i.e. groups of 16 in each) so that it would be easy to separate the loose strands later. Keeping 64 wires in any sort of left-to-right order on the table is pretty much impossible.

weaving in progress v01.JPG

48 of 64 threaded, and a whole lot of wrangling left to go

One thing I remember having to do is use copper wire as temporary ties. Once I had the rough structure tied together it was easy to neaten it up later. Trying to get it all cinched up and neat the first time is way too hard.

Around now it’s finally it started to come together, and I can stand back and enjoy it:

Finished work pair v01.JPG

32 state almost finished, 64 state version completed

Although it still took a very solid evening’s work, (I seem to remember leaving the makerspace after midnight?) I’m happy with the technique now. If you’re interested in maths or stats art, I’d highly recommend making one for yourself, you won’t regret it.

Files are here for anyone that wants to make their own:

https://www.thingiverse.com/thing:3189020

Oh yeah. It has not escaped our notice that the specific method (rigid copper wire, cinched with same) immediately suggests a possible construction mechanism for making a  freestanding sculpture without the need for a support board at all to stand in free space. Hmm…. I might revisit this in the future and see if I can make something nifty looking using that. If anyone else wants to try it in the meantime, I’d love to see how it goes. 😀

Posted in Uncategorized | Leave a comment

Improved Braided Galton Board

I’ve played with the Galton Board before a couple of times. It’s a lovely demonstration of the ‘Central Limit Theorem’ in statistics. That is, it shows in a really intuitive way how repeated binomial events (like coin flips) average out the number of the results into a bell curve.

Finished work overview v01.JPG

In the Galton board, every way from the start to the finish is equally likely.  However, since there are lots more ways to reach the middle than there are to reach the ends, the middle results become more likely.

For example, if we flip a coin exactly 4 times, there’s precisely one way to get all heads:

                                                  HHHH

But there are six ways to get two heads:

                  HH-T-T                  H-T-H-T                  H-T-T-H

T-HH-T                  T-H-T-H                  T-T-HH

So if we flip a coin four times, we must expect that getting a total of two heads is six times more likely than getting a total four heads.

I was pretty happy with my previous Galton boards, but I was still itching for a display with a record of the path each string takes. I realised that if I marked each string twice with the binary code for its route, (once as it progresses through the maze, once as it reaches the bottom) then you’d be able to see that all the final points it ends up in have the same number of colours in each.

The question was just how to be able to make it without having to spend crazy amounts of time assembling it. I tried out a couple of construction methods, first craft beads & builder’s twine:

unfinished early prototype v01.jpg

So much threading of string. Make the hurt stop.

Then  I actually made a rig to spray paint string with binary patterns through a mask. Note the spacing on the right is larger, to give more room for string to be used up bending through the maze. spraypaint_mask_v02.JPG

The spray painting worked fairly well, but it wasn’t as easy as I thought to wrangle all the string together once it was done.

I put that aside for a while, until I got playing with Perler Beads for another project. I realised that since those beads are flatter cylinders than the ones I first tried, that I could make a jig to hold them in place that would make the threading much easier:

threading jig v01.JPG

Binary in motion

All that remained to make it practical was to find some stiffer thread than builder’s cord. That’s when I remembered we had a huge roll of copper wire at Robots and Dinosaurs that hadn’t been touched in a few years. That made it so much easier to put together, and has a beautiful coppery aesthetic to boot!

weaving closeup v02.JPG

Aww yeah.

And here’s a closeup showing that yes, all the bins for a given final state have the same number of white and black beads in each. The sheer ‘heft’ of the middle states is a very nice tangible demonstration of the central limit theorem. final state closeup v01.JPG

And the amount of copper at the start compared to the end is a lovely way to demonstrate the flow of probability mass. It starts off almost as thick as a finger, and tapers down to a single strand.

bifurcating v01.jpeg

For those that want to make their own, I’ll do a second post shortly with detailed instructions. This method is much improved over my first attempts, but it’s still an evening’s work to put together a board.

Still, I’m pretty darn happy with that, and I can safely say after spending so many hours with beads, the centra limit theorem is something I’m unlikely ever to forget.

Posted in Uncategorized | 2 Comments

I’m on EEVBlog

At the Electronex trade show last week I bumped into Dave Jone from EEVBLOG. We got chatting about the polarization stuff I was working on, and after a few minutes Dave turned to me and said “Wait, why aren’t we filming this?”. So I toodled off to my car and grabbed a bunch of bits and pieces and we did an impromptu filming session outside:

Apologies to anyone I confused, everything was totally off the cuff and improvised, and I didn’t have a chance to print out supporting diagrams which might have made it clearer.

I should also mention that I’m just following in the footsteps of David Prutchi, and if you want to get into polarized imaging please read his excellent whitepaper on the subject.

http://www.diyphysics.com/wp-content/uploads/2015/10/DOLPi_Polarimetric_Camera_D_Prutchi_2015_v5.pdf

and and check out the page for his Dolpi Imager.

The relevant blog posts for the bits I was playing with are here:

A couple of minor things to correct in what I said:

  • Single mode fibres aren’t narrower than the wavelength of light they carry, just close-ish to it. (As opposed to multi-mode fibre that might be a hundred times larger) E.g. an IR laser might have a wavelength of 1.5um, a single mode fibre for it might be 8um, and a multi-mode fibre for it might be 100um.
  • Glucose is the sugar I was talking about, in right handed (dextrose or D-glucose) and left handed (L-glucose) and which is capable of optical rotation. Sucrose is more complicated.

And a couple of questions people asked me after:

  • Why not use sugar to do the optical rotation and determine the difference between left and right handedness?
    • Good question. A sugar rotator’s axis is through the R/L points on the sphere, so it won’t move things of the equator. To do that you need something like a waveplate (the green arrow in my model)
  • Why the hell didn’t you clean the window on your LCD device. It’s dirty!
    • That’s not dirt, that science! Or, rather I was avoiding the need for an expensive professional waveplate by using adhesive cellophane which has been stretched and oriented at an exact angle to the LCDs optical axes. It’s not super pretty, but the device would have gone from costing maybe $20 to more than $100 if I hadn’t used it. When I’ve finished my next round of testing I’ll publish a full set of design files and plans for people to make their own.
  • So what about your ipad screen?
    • Yeah, OK, that dirt is actual dirt.
Posted in Uncategorized | Leave a comment

Collatz Dominos

Warning: Level 5 cognitohazard ahead. Mathematicians especially susceptible. Proceed at your own risk:

(More seriously, if you like puzzles/math, haven’t heard of the Collatz before, and have a big exam in the next couple of days, maybe skip this post?)

I’ve previously played around with unusual ways to evaluate the Collatz sequence, but I wanted something more tangible to play with.

The prompt for this is that last week in Robots and Dinosaurs we had a few people seized by the Collatz bug, and working it out on butcher’s paper. Even with a huge canvas it’s surprisingly hard to not run out of space.

If you haven’t tried sketching out the sequence before, such as on a whiteboard or paper, it’s not that easy to do. Because of the branching nature of the sequence, knowing where to ‘budget’ your remaining empty space is difficult. I’d frequently find myself having to erase & redraw large areas, in order to insert some new branch.

I wanted something much more tangible and flexible to play with. I considered making simple tiles (like scrabble), but I thought they’d be very frustrating to move long chains of, while trying to hold them in place.

I considered using M3 bolts as pivots, and kind of hanging the tree, but I though that might be a bit unwieldy. I also thought about using string to join tiles together, but that had a bit too much of ‘A Beautiful Mind‘ vibe…

After a while I had the idea to make a captive swivel, using a two dimensional version of a ball-and-socket joint. The left hand socket is the N/2 side, and the right hand side is the 3N+1 side. After some prototyping, I came up with this geometry, which works well:

branches closeup 01.jpeg

Left hand side is N/2, right hand side is 3N+1. 

And scales up to large chains:

tiles closeup 01.JPG

Flexible chains – The key to mechanical Collatz 

I also made a snazzy case to hold everything. There’s a stack of trays which hold the numbers:

all trays 01.JPG

And each tray has spaces for the tiles, with room for a finger to reach in and remove them easily. The places are labelled to make it easy to pack away:

tray engraving closeup.JPG

Some 8mm wooden dowels glued to the base locate the trays securely, and the lid is held down with a cord, which self-centres on indentations on each side:

wrapped and finished collatz board 01.JPG

Collatz Dominos. The timeless, perfect gift for any discerning mathematician

(Note to self – that title font is called ‘Cooper standard’ and behaves really nicely for lasercutting. Remember that for future projects)

There’s many ways to assemble the tree, but here’s the method I’ve been using. First I arranged the odd numbers in columns, and then make chains by connecting all the even numbers.

playing - all evens.JPG

Now we can take each odd chain, and figure out where it joins up to the rest of the sequence. The tree is starting to take shape:

playing - all under 50.JPG

The first tray of the kit contains the numbers 1-50, whereas the second tray contains all the extra numbers needed to make the first set reach 1. (However I’ve left out the extras needed for numbers 27, 31, 41 and 47, since these four “Bastard” numbers have a chain length around three times the others, and would require having an extra two trays just to connect them up). Once the extra numbers are added, we can see the whole structure:

playing - final collatz tree 01.JPG

The completed Collatz for numbers starting from one to fifty. (With four omissions for simplicity)

I’m very happy with it so far. It’s quite fun to play with, with none of the “whitespace irritation” that comes with pen and paper methods.

If I had to do it again, I’d stain or colour the odd numbers differently, just to make it obvious which method of branching happens at each step. I might still do that if I have time.

Files here for anyone that wants to make their own:

https://www.thingiverse.com/thing:3089372

 

Posted in Uncategorized | Leave a comment

Icosahedron

Here’s a model to demonstrate a little known trick of geometry. The verticies of an icosahedron (20 sided shape) can actually be created using only three rectangles at right angles to each other.

What proportion do the rectangles have to have to make it work? (sigh) The golden ratio.

(I must be jaded from so many people saying anything that’s slightly-larger-than another thing is a golden ratio, that when I actually see a legitimate usage of it I’m disappointed)

Finished cropped 01.JPG

The verticies are strung together with builder’s cord and it’s quite fun to wind it on.

parts and assembled 01.JPG

There are holes for a cable tie, which locks the plates in place. I also ended up putting a seam of hot melt glue on the edges to make sure everything stays nice and cartesian when the cord is tied on it:

cable tie closeup 01.JPG

Files are here for anyone that wants to make their own:

https://www.thingiverse.com/thing:3089076

 

Posted in Uncategorized | Leave a comment

Clockwork Waveplates – Polarization Calculations With Gears

I’ve been playing around with tangible versions of the Bloch/Poincare sphere previously, and I think breaking polarization down into 3 orthogonal dimensions (Stokes vectors) yields such a useful mental model of what’s happening with various complex systems.

In the same vein, I’ve been meaning to come up with a tangible model of what waveplates do to polarization of light. Waveplates are a crucial building block of so much in physics, from microscopes to cameras to quantum computers.

While the Poincare models I made before were handy as a reference, to model a system with multiple filters you have to pick up and rotate the sphere several times, simulating axes at various points. I specifically wanted to find something more direct, and that could be continuously played with to ‘steer’ to a given result. Something you could put in front of a student and say “OK, given horizontal polarization as an input, exactly how would you set up the equipment to convert that to 45 degrees?”

Here’s what I’ve got for the Half-Wave Plate. The two gears rotate around each other, and the coordinate labels on the outer gear swivel as it does so. The input coordinate system is on the base, and the outer gear shows the output frame.

By playing with it for a second, you can see how it shows how Right and Left circular polarizations are always swapped, but by rotating the “fast axis” of the waveplate, you can choose how the linear polarizations are converted.

Annotated halfwaveplate v02.jpeg

Half-wave plate model with gears

Along the same lines, here’s what I came up with for the Quarter-Wave Plate:

Quarter wave plate v01.JPG

Quarter-wave plate model with gears

Here’s a quick application of quarter-wave plates, using three of them as a polarization controller that can put any polarization state into any other polarization state. (Side note: polarization controllers are more commonly made using a quarter-half-quarter arrangement of plates, not a quarter-quarter-quarter as shown here, but this has sufficient degrees of freedom to do this job)

Polarization controller sketch v01.jpeg

Polarization controller, in this case consisting of three linked quarter-wave plates. By adjusting the three angles, any polarization can be converted to any other polarization

Before we test the bold claim about three QWPs doing everything, let’s do a sanity check on the behaviour of the lasercut device. A waveplate shouldn’t affect polarization of light which perfectly matches either the fast or slow axis, so let’s set up the plate with theta=0, and see what happens:

Quarter wave plate sketch 01.jpeg

Quarter wave plate test

As you can see vertical (V) light is unaffected, and left circular (L) light is converted to +45deg diagonal (D) light, as expected.

 

What is we combine two waveplates, and see if we can convert Left-Circular (L) light to Right-Circular (R) light? After playing around with the gears for a few seconds, this configuration seems to work nicely:

Quarter wave plate sketch 02.jpeg

Two Quarter-Wave Plates acting as a Half-Wave Plate, only because their angles match

The nifty thing to note here is that the angle of the first waveplate (120*) matches the second (120*), indeed that’s the only way to make the gears flat. This makes sense, as having them at the same angle is how to turn two QWPs into a HWP.

Alternately if we put the two plates at 90* to each other, then the second plate would ‘undo’ all the rotations of the first plate, and the polarization would be back where it started.

OK, now for a challenge. Here’s a task I picked at random, including at least one ‘weird’ direction to make it harder. Can three QWPs do this? Let’s define our task:

  1. Flip left and right circular polarizations. (LHCP <–> RHCP )
  2. Convert 67.5 degree light (halfway between Diagonal and Vertical) into Horizontal

First, I bolted three QWP models together:IMG_1371.JPG

and then spent a while fiddling until I got it lined up with the goal:

Quarterwaveplate challenge 01.jpeg

Calculating the correct waveplate settings to do an arbitrary rotation of the polarization.

I’m eyeballing it, but I’m going to call the three angles 60 degrees, 15 degrees and 55 degrees respectively. (The camera parallax is a bit misleading too, they look more parallel in real life. )

So that would mean we set up the parts on the optical table like so:

Calculated configuration sketch 01.jpeg

How to double check our answer? It kinda looks right sitting on the table, but would it work if you tried it in the lab with real optics? Let’s do Mueller calculus with those numbers and predict what would happen if we shine LHCP and D/V light in there.

Mueller calculus 01.png

Predicting the result with QWPs oriented at 60, 15 and 55 degrees

The expected number for right-hand circular is [1,0,0,1], which is pretty close to what we got, with just a smidge too much linear polarization. And the expected number for horizontal is [1,0,1,0], which is extremely close.

For lasercut plywood and hastily bent pieces of aluminium, I’m pretty happy with that.

Files are here for the Half Waveplate: https://www.thingiverse.com/thing:3076339

and the Polarization Controller: https://www.thingiverse.com/thing:3076410

 

Posted in Uncategorized | 1 Comment

Better Poincare Sphere

Here’s an update to the lasercut Poincare sphere I made previously. I was very happy with it as a desktop ornament, but it wasn’t quite the tangible intuition pump I was hoping for.

I decided to remake it with the coordinates on the outside and a clear ball on the inside, so that you can ‘fidget’ and rotate the sphere by hand to figure out what series of operations will move polarizations the way you want them.

poincare sphere with waveplate model 01.JPG

Poincare Sphere, with the waveplate’s rotation axis in green

I’ve also included parts to show the behaviour of probably the three most common optical tools. A waveplate, a Faraday rotator, and optical rotation (which I’ve called a ‘sugar rotator’ as it’s more memorable). You can see how moving orientations of the waveplate, or using left-handed sugar instead of right-handed sugar will change the behaviour.

The waveplate (green arrow) rotates the polarization through an axis which always passes through the ‘equator’ of the sphere.

The Faraday rotator rotates the polarization through the ‘North/South’ axis of the sphere, and is proportional to the strength of the field, so you could reverse the magnet to reverse the rotation:

Faraday rotator closeup 01.JPG

Faraday Rotator

The Optical Rotator (Sugar rotator) rotates the polarization around the same axis as the Faraday rotator, but the rotation is due to the subtle difference in the way light propagates through molecules of different chirality. Ordinary glucose we get from plants is all right-handed, and makes a Dextro-rotation on the polarization of the light.

Sugar rotator closeup 01.JPG

Optical Rotation, or a “Sugar Rotator”

If you were to synthesise glucose in the lab, (being careful not to use any ingredients or catalysts of a particular handedness to start), you’d end up with an equal mixture of right and left handed glucose molecules, and the resulting mixture wouldn’t have any net effect on the polarization.

 

I’m pretty happy with it as a model. I’ve had to use it extensively as a reference while designing another project, and it’s quick and simple to play with.

Files here for anyone that wants to make their own:

https://www.thingiverse.com/thing:3076318

(The ball you’ll need is an 80mm Christmas ornament, with the top cut off. )

Posted in Uncategorized | 2 Comments