Clock Hand Motion

Saw an analog clock today at a school, and it surprised me.  The minute hand moved every 15 seconds, and moved a quarter of the way to the next minute each of those times.

Now, the analog clock I have at home is continuously geared.  The minute hand is always moving, just at 1/60th the speed of the second hand [illustrated below]

I couldn’t help but to wonder exactly how the internal gearing of that clock in the school worked.  While we live in an age where a simple internet search and digging through some manuals and videos could explain this very quickly, it seemed remiss to pass on the chance to see what my own knowledge can afford me in an explanation.

My instinct in reverse-engineering something like this would be to think of the states that each hand can be.  The second hand has 60 states, so give it a gear with 60 teeth.  The minute hand moves every quarter minute and therefore must have 240 states, so give it a gear with 240 teeth.  Now how to convert between the two gears?  The seconds gear changes the state of the minutes gear only every 15 times it moves, so perhaps another gear on the same axle but with four teeth, corresponding to every 15 on the seconds gear [illustrated below].  The discontinuities between the four teeth would create the lack of continuous motion in between.

However, there was still one last puzzle.  The minute hand and second hand moved exactly in sync during that one tick on the clock I saw in the school, which implied to me that the teeth must be the same radial size.  Moreover, now that I knew the 1:15 relationship, I could imagine an easier gear pairing to make: Rather than a gear with 60 tiny teeth and another with only 4 teeth the same tiny size, how about a gear with 15 well-defined teeth and another gear with a single 1/15 tooth [illustrated below].  These can then be linked up to the appropriate 60-tooth and 240-tooth gears.  Moreover, in this arrangement, instead of power traveling from the seconds hand then to the minutes hand and having to overcome torque of each in the chain, the power that drives the clock comes from a single axle that transfers power to both the seconds hand and the minutes hand at the right ratios.

String Held Up in Tension

Saw this image online today, and was pretty fascinated by it.

0b7ydlaflqfy

I decided to do a quick free body diagram to get a better sense of how exactly tension was distributed across the string.

File-Feb-14-7-20-44-PM

I color-coded the left-side against the right-side so that you can see the forces balanced by being from the same “spring.” As with any freebody diagram, taking any specific section of the string and summing up the forces coming into it from either direction gives us a sense of the net forces on it.

We see here that sections 1,3,5,7,9 are equivalent and 2,4,6,8 are equivalent.  The odd-numbered sections are in tension with force F, while the shorter even-numbered sections are in tension with force 2F.

This of course is a simplified view of the system because it does not take into account any moments of rotation generated by the masses hanging on the string.

Geometry 6/7/2016

FullSizeRender-4

Stared at some ceiling tiles today, which was a bad call for my productivity because I immediately wondered how the contractors cut and installed the cross pieces, and whether or not their was a standardizable piece that allowed optimal tiling.

FullSizeRender-2

So I started with some exploratory thought experiments.  Pieces that have one intersection and one edge can perfectly cover one square (in pink below) so let’s go from there.  Unfortunately as we add to it (green pieces), we create spaces that standard pieces don’t fit into.  A failure.

FullSizeRender

What about a longer pieces that spans an intersection and two edges?  This creates a very familiar weave-like pattern that definitely tessellates (below).

FullSizeRender-3

However, we aren’t close to a generalize-able rule.  Indeed, one could imagine many other strange angled or partial length shapes that I have not tried yet, and I wondered if there were at least some property that influenced their tessellate-ability.

I began to think that it has to do with the number of intersections and edges that a piece crossed since the relationship between those helps to define how much space the cross pieces need to cover.

An inductive analysis can be used: a single tile has 4 corners and 4 edges, then four tiles have 9 corners and 12 edges, and then nine tiles have 16 corners and 24 edges (image below).  This is solvable by looking for the pattern (n^2 corners to 2n^2 edges), but the answer is easier to come to if we simply look at the general situation of each corner and each edge instead.

FullSizeRender-5

In a fully-tiled situation, a corner sits at the intersection of 4 tiles while an edge sits at the intersection of 2 tiles.  There we have it then!  For an infinitely tiled surface, you will need a corner for every 4 tiles, but an edge every 2 – there will then be a ratio of edges to intersections/corners of 2:1.  Thus, this must be a design constraint of the cross-pieces (which agrees with why my second thought experiment worked unlike the first).

While this does not give us a way to define all possible cross piece shapes (one could imagine a complicated cross-piece shape with 74 edges and 37 intersections but does not tessellate), it does allow us to check if a cross piece shape could potentially tessellate.

Avatar: The Last Airbender Power Levels

When physics and “superpowers” reconcile (or not), it’s all in great fun.

A show that I like for various reasons, but that has also shown a variety of great feats is “Avatar: The Last Airbender” and the subsequent “Avatar: The Legend of Korra.”

One of the most extreme examples of bending happens when Ghazan melts the Northern Air Temple Mountain:

Given: an approximate energy of 900kJ/kg to melt rock[1] and an average density of 2.7g/cm^3 for rock [2].

[1] ( http://home.earthlink.net/~jimlux/lava.htm )

[2] ( http://en.m.wikipedia.org/wiki/Continental_crust )

Approximate: The temple has a footprint of about 500m x 500m = 250,000m^2.  The mountain has rather sheer faces so let’s give it a cylindrical profile and say about 400m vertically is melted.  That’s 100,000,000m^3 of rock.

Based on our givens, that is 270,000,000,000kg of rock or 243,000,000,000,000kJ of energy, 243 petaJoules.

Gazan outputs the energy equivalent of the Tsar Bomba, the largest nuclear device ever tested.

Or enough to power all the electricity in New York City for 6,136 days, i.e. 17 years.

If the energy all came from within him through conventional biology, he burned 5.8×10^13 kilocalories (or just capital “C” Calories – of which we are recommended to eat 2000 a day by food packaging), that’s 29,000,000,000 days or 79 million years of meals.  If he was converting mass directly to energy, then via Einstein, he lost 2.7kg of pure mass (not bad!).

One could argue that characters are tapping into energy sources external to themselves when bending, nevertheless, it is interesting to know just how much of it they must be accessing.

See this Google Doc for further calculations with Zaheer, Avatar Kyoshi, etc.

Google Doc with More Details

Geometry 12/2/2015

Here’s another puzzle that had me occupied all of my bike ride home yesterday:

While stopped at an intersection, I noticed how the windows on the building across the street allowed me to see oncoming traffic from the side from farther away than I had turned my head.  And so I wondered, what relation and how much of a reduction in neck strain does such a situation promote?

1-1

Clearly you need to turn your head only b degrees instead of a degrees, but that relationship can be anywhere from a negligible difference when the target is right against the mirror to a near complete reduction if the mirror was at infinity.  What’s the actual relationship though?

2

The target is at some x and y position away from us the viewer, and in the case of a building where the reflection is always ideally positioned, it only matters the y’ distance of the building from the target (the image will be the same distance behind the mirror).

With all of three of these values, we can find the angle of the triangles formed in the diagram by arctan(y/x) and arctan((y+2y’)/x).

The angle I must turn to look at a car then is (90º – arctan(y/x)), while I only need to turn (90º – arctan((y+2y’)/x)).

Wolfram alpha can help us with the rest of the work here in visualizing this relationship, and we can choose to look at all three as variables or arbitrarily set certain one’s as constants.

For example, if we are interested in how the ratio of the reduction behaves as a function of the distance of the mirror, see the following graph.  The ratio of the image in the mirror angle to the object angle is y and the distance of the mirror from the object is x in this case.  (as expected, mirror farther away means you have to turn your head less)

Screen-Shot-2015-12-02-at-1.47.48-PM

Or, if we are interested in how the ratio of the reduction behaves as a function of the x position of the object (the farther away it is, the closer the angle is between the mirror image and it):

Screen-Shot-2015-12-02-at-1.50.32-PM

Or we can vary both the position of the object and the mirror at the same time (reflected in the top right quadrant of the below graph since both values can only be positive):

Screen-Shot-2015-12-02-at-1.51.04-PM

ADDITIONAL:

By the way, if you were wondering about the ideal positioning of a mirror to see an object at your side, the relationship is governed by (y+y’)/(x-x’) = y’ / x’ where x and y are the position of the desired target object to your side and x’ and y’ are the position of the mirror relative to that object.

3

x’ and y’ have an expected asymptotic relationship where they start right on top of the target to halfway between you and the target in x while infinitely far away in y. Per Wolfram Alpha below (setting y=1 and x=2).

Screen-Shot-2015-12-02-at-1.44.04-PM

Paracord Shock Load

Here’s a question that I’ve wondered about:  What’s actually a safe load to put on paracord in case of it slipping and dynamic loading?  Paracord should be a shock cord since it was originally for parachutes, but it’s always rated by a static load weight.

Here’s the best I’ve gathered (internet, please correct me if any of this is wrong):

An approximate equation for shock load is:  shock load = weight * ((fall distance / elongation) + 1)

Properly rated paracord should elongate at minimum 30% (more is better so let’s use 30% as a worst case).

If are you dropping something with the cord, the fall distance is the cord length or 100%.  The equation reduces to weight * (1/0.3 + 1) or weight * (13/3).  A weight being dropped on paracord can generate a shock force of about 4.333 times it’s weight.

So going in reverse, if we take the static load of paracord as it’s net breaking strength, do not load it with more than the inverse of that factor in weight, 3/13 or 23% of it’s rated strength.

Geometry 7/16/2015

Inverse kinematics today.

So here’s another random geometrical situation that caught my attention while I had some downtime at work today.

Imagine we have two monitors that we would like to pivot so that they always stay in contact; however, we don’t want to install and ugly hinge along the front surfaces so we build an arm attachment in the back.  Of course, it can’t be one arm because that doesn’t physically work, but two arms hinged to each other and to the monitors will.  This raises interesting questions about how the arms need to move together to pivot the screens, especially if we would like the system to be automatically driven and move at an even and smooth speed.

2015-07-16-17.25.10

I haven’t yet figured out all the equations and differentials that govern the relative movements of the arms, but some quick thought on the ideal case can get us in the right direction.  Imagining a perfectly equilateral triangle setup, and also ignoring the thickness of the screens, we see that every 3° rotated by the screen requires a 1° rotation on each internal angle of the hinges.  Twisting each hinge at a fixed speed will result in the screen pivoting at 3 times that speed.

Of course, this becomes less true as the arm lengths vary: an armature with a √2 ratio with the short arm being the length of the distance between the two screen hinges (starts off in a 90°, 45°, 45° triangle) will not be able to rotate the screens to a full 90°.  But to get to a 45° angle, must rotate ~27.0°, ~4.4°, ~22.3° respectively.

Or, think of an armature that can just get to a 90° screen rotation by having a long arm that is the distance between the two screen hinges and a short arm that is 1/√2 times that.  It starts off in a ~69.3°, ~69.3°, ~41.4° triangle, rotating ~24.3°, ~24.3°, 41.4° respectively.

Of course, the correct way to do this is clearly just to build the darn setup, manually rotate the screens, have sensors record the movement, and then feed those movement curves back into the motors.

On the Wonders of IFERROR()

If you’re spreadsheet is meant to be looked at by other people, you should just about nest everything in an IFERROR([formula],).  The nothing after the comma means that in the case that your formula throws an error (#VALUE, #N/A, #REF!, et cetera), nothing shows up in the cell.  No distracting error text.

Now, this doesn’t mean you shouldn’t debug your formulas first, but if there are normal cases where they might throw some of these errors, IFERROR() is invaluable.  (e.g. I have a dynamically updating query list and I know that sometimes the query will return nothing).

On the Quirks of INDEX()

I’ve been working on a self-updating bi-weekly deliverables calendar / dashboard in Google Spreadsheets for my office the past few days.  Our Traffic Manager can simply add projects and their various deliverables to other sheets which serve as databases. Then another sheet, which one of our animator a painstakingly organized for aesthetics, will search those databases to pull deliveries to their correct dates and color-coding based on other information associated with those projects.  This sheet updates itself based on the current day and week.

Recently, a switch I made from INDEX(FILTER(SORT(…))) to INDEX(QUERY(…)) for minimization purposes resulted in some peculiar behavior.

But first a preface as to why I am using INDEX for array formulas that are perfectly capable of expanding themselves down multiple rows.  Our animator has used the spreadsheet as a grid to help align elements, merging some cells and leaving some as borders.  This means that the cells no longer behave like a sequential spreadsheet.  For example, merged cells behave as only their top left cell.  Net result is that I need to write a specific formula for each identified locus of data.  Somewhat more time-consuming but not un-doable.

Anyway, so I was using INDEX() to return whole rows from my QUERY() via INDEX(QUERY([array], “select Col[#],Col[#] where …”),1).  This worked fine when the QUERY() pulled more than one row; however, when the QUERY() only pulled a single row, INDEX() only pulled the first entry where I wanted the whole first row, and where it would have pulled the non-existent second r0w, it pulled the single entry from the second column.

I cannot confirm my suspicion, but I surmise that QUERY(), as written by the programmer returns a one dimensional array when there is only one row of results and a two dimensional array when there are more.  This inconsistency means that INDEX(), when passed only a single number, pulls that index from an array, resulting in a single element from a one-dimensional array, and a whole row (or sub-array) in a two-dimensional array.

Unfortunately, to a naive user on the front-end who expects that number of their INDEX() function to always refer to a row, this is confusing and un-beneficial. I have not figured out how to solve this problem yet, and instead have broken up my QUERY() to multiple ones that only query single columns, thus guaranteeing that the dimensions of returned arrays are always 1xN.  It has maximized rather than minimized my formulas, but is more robust for the time being.