Intel's Ronler Acres Plant

Silicon Forest
If the type is too small, Ctrl+ is your friend

Friday, June 8, 2018

Bugs

I've been working on my Farey addition program and I found a couple of bugs. The first one a simple mistake that took me four days to find, mostly because my mind was a bit fuzzy. The problem was that I was using abs (absolute value function for integers) instead of fabs, which is the same function, but for floating point numbers. One little letter and everything is wrong.

Got that corrected and now I'm running the program and when the denominator gets to 4142 it goes off the rails. What the heck could be causing that? It's been working fine for the first 4141 denominators, why should it choke on 4142? It blows up when it is checking the Farey addition. Doing this only involves integer operations, and they are all relatively small integers, we aren't going to overflow the accumulator. What could possibly be go wrong? This one had me stymied for a couple of days, I couldn't even think of what to look at. There is nothing wrong except it doesn't work.

This morning my brain served up a clue. When I generate the fractions, I compute their decimal value and use that to sort my list of fractions. The problem is that I also depend on this value being unique. If two fractions have the same decimal value, I presume they are duplicates and eliminate one. The problem might be (I haven't verified it yet) is that two fractions could have the same decimal value, but be different. For instance, Google delivers these values:
2048 / 4007 = 0.51110556526
2071 / 4052 = 0.51110562685
2117 / 4142 = 0.51110574601
The first 6 digits of these three fractions are all the same. After that they diverge. In my debug output, they all show the same value, but then I am only printing the first six digits. Standard floating point values hold much more than six digits, so maybe there is something else going on here. Anyway, I've got a place to start looking which is more than I had a couple of days ago.
 

Wednesday, June 6, 2018

Fly Me To The Moon


Amazing Efect Kopp-Etchells V-22
Inter X

The bright halo of light emanating from the tips of the helicopter's rotor blades is caused by sand particles impacting the leading edge of the rotor blades. This constant abrasion erodes the blades  making them unusable in short order. To combat this, the leading edges of the blades are now reinforced with a tough material like nickel or titanium.

The impact knocks loose a tiny chunk of metal as well as heating it. It might it heat it to incandescence and we are seeing the metal particles glowing, or it might heat it to the point of ignition and we are seeing the particles burning. Or it might be a little of both.

Around the 1:20 mark (in the above video), we see a couple Osprey fly over, and you can see a soft glow from the tips of the rotor blades. This is likely from the glow-sticks the Army has attached to the rotor blades, not the Kopp-Etchells effect.

Re the name:
The combat photographer and journalist Michael Yon observed the effect while accompanying U.S. soldiers in Afghanistan. When he discovered that the effect had no name he coined the name "Kopp-Etchells Effect" after two soldiers who had died in the war, one American and one British. - Wikipedia
Michael Yon has some photographs.

Via Quora


Part 2


Thailand Girandola

Another rotor craft heading up. How high does that thing go? It looks like it's going to the moon! It is not actually a rotorcraft. It spins around, but the only thing giving it lift are the rockets.

A Girandola is an outgrowth of the Catherine Wheel, named after Saint Catherine who was to be executed on a breaking wheel, but said wheel shattered at her touch.

Flying Girandolas, like this one, have been around since the 19th Century. If anyone built one earlier, they're keeping mum.


Part 3


56,000 MPH Space Rock Hits Moon, Explosion Seen | Video

We've flown to the moon just in time to see a cosmic grain of sand smack into the moon. 56,000 MPH is roughly 16 miles per second, about three times faster than a satellite in LEO (low Earth orbit). Similar effect to what we saw with sand hitting the helicopter rotor blades, but no oxygen on the moon means we are only seeing incandescence, not combustion.


Part 4


ORIGNAL CCTV Footage of Asteroid 2018 LA (ZLAF9B2)

A small asteroid hit Earth on Saturday, June 2nd, exploding in the atmosphere over Botswana before it could reach the ground. The Catalina Sky Survey in Arizona had discovered the space rock only hours earlier as it hurtled toward our planet from inside the orbit of the Moon. Sensors used to monitor rogue nuclear explosions detected the asteroid and estimated its yield near ~500 tons of TNT. - Indy Tom
Plenty of oxygen in our atmosphere, so a little incandescence and a little combustion.

Update September 2020 replaced missing video.
Update February 2023 replaced first video which had gone missing.

Saturday, June 2, 2018

Word of the Day

Bijection
In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between the elements of two sets, where each element of one set is paired with exactly one element of the other set, and each element of the other set is paired with exactly one element of the first set.

Friday, June 1, 2018

Restaurants

O'Connor's

O'Connor's closed for good yesterday. This puts a big hole in my life. My Tuesday gang has been eating lunch there for on Tuesdays (imagine that) since forever.

Salvador Molly's

We had dinner at Salvador Molly's yesterday. Trendy, noisy, but the food was good and prices were bearable. $80 for four including beers.

Besaw's

Breakfast this morning at Besaw's, the oldest restaurant in downtown Portland, or close to it. It's in a new building. I don't know if they have any connection to the original besides the name, but it was fine. A little spendy, $40 for two, including coffee.

March of Progress

Portland Parking Meter
Most of the city parking meters I have used recently print a ticket for you that needs to be displayed in your car. This one dispenses with the dispensing. You enter your license plate number and pray that you entered it correctly and the meter man interprets it correctly. It all works fine except that the screen is hard to read, especially the labels displayed above the yellow buttons because some punk jackass had to carve some kind of bullshit into the screen. I would say it looked like Asian gang characters, but that's probably racist, and it could have been Klingon for all I know.

Pic of the Day

Grumman F7F Tigercat
Korean War era, twin engine fighter for the Navy. Reminds me of the Twin Mustang, another twin prop, Korean War veteran.

Tangent Circles

Fun with Circles
I came across this bit of geometry on Quora the other day. I haven't quite sorted out just why it works, but if it does, it's pretty cool. I was so impressed with it that I printed a copy and took it lunch to show the gang.


Funny Fractions and Ford Circles - Numberphile

Dennis responds with this video, which also has a bunch of tangent circles along with some goofball math. I saw this and thought that it wouldn't be too much trouble to write a program to verify what's going on here, so I did. Turns out there were a couple of tricky bits that needed sorting, but I think I have it. The first tricky bit was figuring out how much memory I would need. I wrote about this a couple of days ago.

int gcf(int m, int n)    // greatest common factor
{
    if ((m==0) || (n==0))
    {
        if ((m==0) && (n==0)) return 1;
        if (m==0) return n;
        return m;
    }

    while(m!=n)
    {
        if(m > n)
            m -= n;
        else
            n -= m;
    }
    return m;
}

The next was figuring out how to find the greatest common factor (GCF) of two integers. I've run into this problem before, but where oh where has that bit of code gone? I dunno, but Google finds an example, but it doesn't work. I have to spend several minutes monkeying with it to get it to behave.

That was enough to verify that the Farey addition of fractions works. That is, you generate all of the fractions between zero and one using all denominators from 1 to whatever. Now take any three adjacent fractions on the number line. Add the numerators of the first and last and you will get the numerator of the middle one. Do the same for the denominator and you get the denominator of the middle fraction. You might have to reduce the fraction to make it identical, but the value will be the same regardless.

Verifying that you could use these fractions to generate tangent circles took a little more doing. One way to do it would be to check this out for every new denominator, since at that point the fractions on either side would be the ones you would be forming tangents with. I didn't want to do that, mostly because I was already generating all of the fractions prior to checking the Farey addition, so I need some way to keep track of a fractions "parents" even after multiple fractions had been interposed between them. What I finally settled on was, after generating all fractions for the next denominator, I recorded the values of the parent fractions. Then later I would use these values to locate the original fraction and verify that the generated circles would indeed be tangent.


Tangent Circles and Pythagoras

Verifying that the circles are actually tangent to each other is done by comparing the sum of their radii with the distance between their centers. If these two values are equal they are tangent. If the distance is larger, they are not touching. If the distance is smaller, they overlap.

The distance between centers can be calculated using the Pythagorean Theorem. All you need is the horizontal distance, which is simply the difference between the values of the two fractions, and the vertical difference, which is the difference in their radii. See the above illustration. The orange and purple lines form the sides of the right triangle and the black line forms the hypotenuse.

I fired up my program around 12 hours ago. I gave it some big number to work with, like a 100,000 or something. It has generated over 20 million fractions and it is still running. It seems to be marching on regardless of whether the desktop goes to sleep, or if I am using the computer. I am debating whether I should cancel it or let it keep running. If I remembered what the number was that I gave it, I could estimate how long it is going to run, but I just typed in a one and bunch of zeros. I suppose I should let it run just to make sure it doesn't crash before it finishes.

I've uploaded the source to github if you are interested. I intend to clean up the output so it gives a better picture of what it's doing. When I have done that I will update github.