Thursday, January 3, 2013

Conference Panel Part 3: MATH!

In Part 1, I taped down some LEDs and learned how to code with Arduino.
In Part 2, I tried some ideas for construction and geometry.

In Part 3, It's time to build an actual prototype.

As I get ready to cut and drill material, it's time for a layout.

The "guestimated" layout worked pretty well, and I learned some important things about the geometry of the structure.


The light cells are demarcated by the dividers, not the LEDs.
A "shared" 0,0 point just adds CPU cycles and significant code space to calculate the color of the cell. Either skip it entirely or let it mix naturally from the neighboring cells.
With 50 LEDS on the double strand, 10 spokes of 5 LEDs
And with no LED in the center, that makes 6 cells per spoke,

I want each cell to have about the same brightness.
The LEDs put out a cone of light 120° wide...  A little inverse-square for the falloff, figure in the reflectivity of the card material...
That's going to be one heck of a mathematical model.
I just need a relative width for the each ring.
Calculating the difference between the area of the arc for outside boundary and the inside boundary would give the area, but maybe there's an even simpler way?

10 spokes is dodecagon. Close enough to round for estimation purposes.

If each spoke is 18° wide (180° divided into 10 spokes), how do we calculate the area of a given cell?

Let's split the 18° isosceles triangle into two 9° right triangles.
Area = 1/2 × r1 (height) × b
And since that's only half the full 18° slice, Area = r1 × b.

How do we get b?

"Slope" of 9° = tan(9) = 0.158384440324536
So base (b) =r1 × 0.1584.
And area = r1² ×  0.1584

My math skills are too rusty to try and solve this multidimensional problem, but that's why we have computers!
I'll just step through all the possible divider positions and determine which configuration has the lowest standard deviation in area.
My first inclination is to just Monte Carlo the model and find a "good enough" solution, but there are a number of assumptions we can make that should make the experiment set small enough to calculate the whole thing.


  • Because the area grows with the square of the radius, no ring can be thicker than its inner neighbor
  • Because of the above assumption, no ring can be thinner than the total radius ÷ number of rings

I'm looking for an excuse to practice coding in Python so that's the language I'll use.
You can see the code at GitHub.
Without the optimizations, the program took over an hour to run on my laptop.
With those tests, it took about 28 seconds.
The solution is: [40, 57, 70, 81, 91, 100]
So these are percentages of the radius for each divider to yield a consistent area for each cell.
Let's see what that looks like:

The area-based division is closer to my proof-of-concept model, but the center disc is much larger than I want.

Modify the program to remove the center disk from the calculations and fix its size at 24%, and we get:

Which seems like a reasonable compromise.


While I want to build a bigger display, I also want this to be easy to construct.
Art board and plastic come in 20" x 30" and 40" x 30"sizes.
Biggest power supply is 2-3/8" (60mm) wide
Proof-of-concept model is 1-3/4" deep.

The matrix displays for the base are 1.2" tall. (1.6 with the driver board.)

Transporting the 30" cardboard proof-of-concept was easy. 40" panels are a little too big to comfortably carry around.

This will have to ship or go in checked baggage, so it will need a solid case.
SKB Cases sells an audio mixer case that seems about the right size.
Pelican has a similar case, and flat shipping case that would handle a 40" wide version.
These cases are expensive. Cheapest one would be over $500 with foam and accessories.

I'm mostly concerned about crushing damage, but lightweight case might be adequate.
Philly Cases has lightweight plastic case  with plenty of room for about $200.

So a good transportable size is 32 to 36 inches wide.
Next build will be 34" wide (17" radius) with a 2.5" base yielding a height of 19.5 inches.

Yeah, Yeah... Since I only need the ratios of the radii, I didn't need to calculate the are of the wedge. I could just use the whole circle instead with the old π r².

Tuesday, January 1, 2013

2013 Predictions

I was quite ill this time last year and so didn't get my annual prediction post up.
Here we go for 2013!


Google Glass

Google Glasses will dominate the presentations at Google IO, although developers won't actually have their samples.
There will be no retail product in 2013.
Mobile connectivity will prove to be a problem. We can't all have a team of people with parabolic WiFi antennas, so using the glasses "in the wild," will  be of limited appeal.

Google Fiber

Google will fully provision the Kansas City "fiberhoods" months ahead of schedule and hold a second round of neighborhood sign-ups.
They will announce the next two cities to get Google Fiber with registrations opening up 2014.
There will be solid rumors, but no announcements, of a Wireless service from Google.


Google Plus will continue to be popular with the nerd crowd, but make little progress against Facebook.
Google Search will announce a new deal allowing better coverage of Facebook or Twitter.


The "channel" model and algorithmic curation will prove to be unpopular with viewers, and before the end of the year, YouTube will be restructured around individual shows and personalities.
Even though I predicted it years ago, and I've been wrong, I still think YouTube will pick up a cancelled TV show. I think it's much more possible this year now that NetFlix has picked up Arrested Development. It will be a challenge to find a traditional television show that can operate within a new media budget, but it will eventually happen. Why not this year?
We will see new YouTube apps for set-top devices, televisions and possibly a dedicated YouTube box.


No Apple Television

Broadcasters will not play ball and Apple will not be able to put together the licenses needed to launch the television product in 2013.

iPhone & iPod

Apple will drop the iPod nano and introduce two new form factors for the iPhone. One of which will asymmetrical.
Apple Maps will continue to be a sore spot.


Windows 8/RT

RT will be a retail disaster. Consumers will buy a "Windows" product that doesn't have windows and that doesn't run existing Windows software.
Enterprise will ignore Windows 8 for years. For companies that finally moved off of Windows XP, Windows 7 is working fine.
Windows 8 will be very popular on laptops.


Next gen console will be announced and demoed. Shipping in 2014.
Surface tablet will be discontinued. Other hardware manufacturers will be reluctant to make their own versions.


I've been wrong many times predicting a flattening of Facebook's growth.  So let's just assume it will continue to grow...
Facebook will buy a media production company to create proprietary content for Facebook members.



No significant increase in sales of electric and hybrid cars in the US.

Autonomous Vehicles

Most states will have laws on the books allowing autonomous vehicles by the end of 2013.

Crazy-Ass Wildcards

  • Makerbot Industries or another 3D Printer company will open a store in The Mall of America.
  • Turnips will be the next big food trend.
  • 50 Shades of Gray will finally fall from the Amazon Top 10 list.
  • Another popular dinosaur will be removed from the official list.
  • SpaceX will announce a launch date for a manned moon orbit mission.