Idle Chit-Chat
An Important Science Question Investigated
January 9th, 2010I give this to you without comment:
Idle Chit-Chat
I give this to you without comment:
The Great Adventure
Last night as my sweetie and I were sharing a big salad and watching TV, she turned to me and said, “We should do Lite Brite!” I readily agreed. I had never seen an actual Lite Brite in action.
You remember Lite Brite, don’t you? It is a backlit frame into which you can stick translucent plastic pegs. The colored pegs glow merrily. Lite Brite! You can paint with light! the jingle went (approximately).
I had given the Lite Brite a lot of thought back when I was roughly four years old, and occasionally thereafter. I only remember little bits and pieces of the kids’ program Captain Kangaroo, but I remember the Lite Brite ads that supported the good Captain and his loyal sidekick, Mr. Greenjeans. I remember the ads very well, because it was one of the earliest engineering challenges I ever tackled. How the heck did the dang thing WORK?
In the ads, the pegs are pushed into a black surface and light up. Sweet! obviously there is something backlit and when a peg is pushed in it glows. At first I tried to come up with a system where pegs could be placed anywhere, and stay in place. And then came the real engineering challenge: making the holes close back up when the peg was removed. This last feature was obvious—otherwise the toy would not be reusable, and the smallest mistake meant you ruined everything.
After more careful observation, I saw that the pegs were always in a grid pattern on the board. So, I realized, there was a grid of holes that the pegs could be punched into. With that knowledge, I imagined a system with little spring-loaded doors for each hole. Push the peg in, the flap opens and light comes through. Pull it out, and the flap closes. I watched the ads closely for any sign of the doors. There was none. The black surface seemed completely uniform. Perplexing. Over the years I mentally fiddled with different designs for the Lite Brite doors that would not be prone to light leaks.
Fast-forward forty years, when I came to live with someone who owns an honest-to-God Lite Brite. At last the Engineering mystery would be resolved.
The answer: black paper. No doors, no flaps, no self-repairing gelatinous layers. You mount opaque paper over the grid and punch holes in it with the pegs. There is no undo. The black papers that come with the LIte Brite have little letters printed on them, for color-by-numbers fun. And really, can you imagine how long the delicate little mechanisms I had been imagining since my very first days of TV watching would have lasted? In my gut I knew that there had to be a simpler answer, but I never let go of my assumption that you could take the pegs back out again.
We sat on the floor, my sweetie and I, taking turns punching in the little pegs (I had trouble differentiating the pink and orange ones before punching them in), and had a good ol’ time. When we were done we kept the Lite Brite plugged in to bask in the glory of our masterpiece. And it was good.
Rumblings from the Secret Labs
If you want the job done right, find the right geek.
You may have noticed that as of this moment there are three different moon phase widgets over on the sidebar. None of them are perfect, alas (although the Japanese one is perfectly inscrutable). I looked around at other WordPress widgets and did not find one that gave out all the information I was interested in (especially for the eclipse) and was aesthetically pleasing. I thought I might spend a few hours and make my own.
The design was very simple. I would write a little Flash thingie that read XML data from a server and draw the moon with great precision and also look nice doing it. In addition I could put numerical readouts for more interesting (to me) numbers. Piece of cake.
I started my quest looking for a server with current moon info. The US Naval Observatory has all sorts of lunar data available, presumably calculated with far greater precision that I will ever need. The only problem is, they didn’t have data for right now. They had almanac generators and whatnot, but nothing that I could ping and get back a message that said, “at this moment, the moon is…” I couldn’t find anything at NASA, either. I broadened my search and found that nobody seems to be providing this service. “fine, then,” I thought. “I’ll make my own moon server. I’m sure there are plenty of places I can find algorithms for calculating this stuff.”
Only, that didn’t turn out to be so simple, either. The motion of the moon is incredibly complex. There exists a thing called ELP 2000-85 which is the latest attempt to make the math match what the moon actually does. What the thing does is loop through a set of calculations a bazillion times, each time with tweaked coefficients that make smaller and smaller corrections to the calculation. Compiling the tables of coefficients must have been a real pain in the butt. Refining the tables is still ongoing. The accuracy of your calculation comes down to how many times you loop through the coefficients before you decide that the computer power is better used for something else.
Nobody in their right mind would actually use all the tweaks in the ELP 2000 for anything as simple as a moon phase widget, or, for that matter, a moon landing. Along came a guy named Jean Meeus, who published a book full of handy formulas for calculating where things are going to be. He includes simplifications of the ELP 2000 (only looping through 64 iterations), and while they’re not as precise, they’re pretty damn good. I don’t have that book, either.
Time wasted so far: 3 hours. Completion of widget: 0%
But now my search began to bear fruit. I didn’t have Meeus’ formulas, but other people did, and had written software. I found some open-source code that implemented some of his stuff. Yay! I implemented the code, moving it from c to PHP so I could run it on my server. After a few routine hitches the code was up and running and telling me just where the moon was, relative to the Earth, accurate to a couple of arcseconds.
Time wasted so far: 6 hours. Completion of widget: 5%
Unfortunately, it didn’t tell me anything else. This particular code did not provide any information that required data about the sun — like, say, the phase of the moon. Harrumph. Back to the Internet I went. Fairly quickly I found some different code, this time in JavaScript, that also cited Meeus. It was much, much, simpler, ignoring many of the more difficult-to-calculate corrections, but I figured that the first code sample had already done most of that. It was simply a matter of adding the new code to what I already had. Naturally, despite having the same source reference, all the variable names were completely different.
After a great deal of forensics (that’s a big word for ‘wasted time’) I established which quantities I had accurate versions of and which I still needed to calculate. I got everything set up and ran some tests. The results were not good.
Time wasted so far: 12 hours. Completion of widget: 3%
I had expected some problems like this – perhaps in one body of code an angle was expressed in degrees and the other expected radians. Things like that. I started working through things. Only after another day of head-scratching did I test the code I’d based the second half of my project on. It was wrong. So there I was with Frankenstein’s monster of code sewn together from different sources, and one of the sources was broken before I even started. Sigh. Back to the drawing board.
Time wasted so far: 20 hours. Completion of widget: 2%
I should mention along in here somewhere that there are people who sell moon software for quite a bit of money. My little server could potentially put a dent in their sales by bringing accurate calculations to anyone who asks, but its not really the calculations they are selling, but the application around it. I’m not too worried for them.
Back to the Web and by now I was getting better searches because I knew the key terms to look for. I found two more code examples, both of which take precision to the most extreme available. One is a complete implementation of the ELP 2000-82b. This honey consists of 36 files with tables with hundreds of rows of numbers, and a sample program in Fortran that shows how to use them. For ridiculously accurate calculations, I couldn’t do much better. But… It only calculates the position of the moon, just like the first code I implemented. I’d still need to work out the phases and whatnot.
The other code I found is based on earlier math, but really concentrates on what an observer would see from a given point on the Earth. It includes corrections for the optical effects of the atmosphere and for the friggin’ speed of light. It’s got a lot of stuff I don’t need (other planets, for instance), but it has everything I’d be looking for. The thing is, the code is horrible. It’s in c, and the writer apparently never heard of parameters or returning values. Or structs, or anything else that might help organize the information. It is impossible to read a function and know what it does or where all the numbers it uses come from. It would be a big task to translate the pieces I need, mainly because it’s very difficult to tell which pieces I need. Still, it’s an option.
Time wasted so far: 24 hours. Completion of widget: 3%
And that’s where I stand. You know, maybe I’ll wait until I’m on a boat full of moon geeks. I bet one of them even knows a Web site that gives current moon data.
Observations
While living in Prague I probably drank more tap water than anyone else I knew, but I drank plenty of bottled water as well. Since I was a) environmentally aware and b) lazy, I ended up with a large collection of bottles waiting to go to the recycling bin up the road. After a while I began to observe a pattern, and as I packed up the apartment to move back to the states I took a brief timeout to document the phenomenon. Please observe exhibit A:
The bottle on the left is the youngest, the oldest is on the right. The burning question for today is, “why are the bottles shrinking over time?” All the bottles were stored with lids on, some with dribbles of water in them. Sometimes the water had been carbonated, other times not. Bottles do not puff back up when the apartment is particularly warm, nor can I find any other thermal explanation that would not even out over time. Age (on the scale of months) is definitively a factor.
So what’s going on? Is there a chemical reaction with the plastic that is reducing the number of gas molecules inside? Is there a sort of one-way membrane effect going on that lets air molecules out but not back in? Most likely the pressure is lower in the bottles than outside, due to the plastic wanting to revert to its original shape — unless there’s something about plastic that makes it want to shrivel up like that.
Any chemists out there want to hazard a guess? Physicists? Mechanical engineeers? UFO conspiracy specialists? Science Fiction writers? I’ll listen to any theory you care to offer.
Writing
So I’m writing a story that takes place in the Tincaniverse, a neighborhood of the Sciennce Fiction world that suspends a couple of physical laws because they are inconvenient, while still maintaing a general feeling that science is real. Anyone who writes a story with faster-than-light travel or spaceships with gravity holding people to the decks is playing in this same universe. Everyone knows time travel is sci-fi hooey, but time travel and faster-than-light travel are pretty much the same thing as far as physics is concerned. This is the inconvenient bit that writers and readers would prefer to ignore.
Time travel stories are really tough to do, because the writer is obliged to create an elaborate set of rules to prevent paradoxes. Many writers go for the branching-universe model for time travel, that posits that when you change an event in the past you spawn a branch universe that reflects the change, while there’s still another copy of the universe crashing along as if nothing ever happened. Which means the catastrophe the protagonist went back in time to prevent still happens, just not on his new time line. He’s just blown off his friends to horrible suffering while he goes and has fun with copies of them. Selfish bastard.
Still, time travel makes a good story once in a while. (See “William Ashbless” and “Red Dorakeen”)
Anyway, here I am in the Tincaniverse, thinking about the most poetic way to wrap up a story, and suddenly selective relativity is attractive. Distance and time being synonymous really works in this case. The question is, am I brazen enough to go for it?
Idle Chit-Chat
As I compose this I’m staring at bamboo shoots growing and apparently prospering in a glass vase with nothing in it but water. There’s plenty of the most important atoms available, Hydrogen from the water, Carbon and (depending on the plant?) Nitrogen from the atmosphere. I’m not a botanist; please don’t use my musings here on your biology pop-quiz tomorrow.
But what about the other trace elements that living things need? Is bamboo so well-adapted to mineral-starverd environments that it hardly needs any of these other elements? Does that in turn make it a lousy food? Would the plant die in distilled water? So many questions…
Get-Poor-Quick Schemes
So, I’ve been thinking a lot about radiators lately. When you’re driving in a very low car, sometimes all you see of the vehicle behind you is the big chrome grille designed to let air through to reach the radiator. Even cars with excellent aerodynamics are forced to have this component that, by its very nature, requires wind resistance to operate. There is even a fan to expend more energy to make sure that air is passing over the radiator at all times. If there was a way to get rid of the radiator, fuel efficiency in vehicles would be increased. Maybe not a lot, but a measurable amount that would certainly add up.
The only catch is that the radiator is really important. Owners of old air-cooled Volkswagens can testify to that; those engines had no radiators and were not terribly reliable — plus, they paid the same aerodynamic price to have the air pass through the engine compartment.
Internal combustion engines produce a lot of heat; in fact, thermodynamics says that the hotter they burn, the more efficient they are. My clever nephew Gerald, when presented with the Radiator Conundrum, realized immediately that one solution is simply to embrace the heat rather than get rid of it. If one builds the engine out of materials that can withstand much higher heat than modern engines, then you can let that sucker get really, really hot and actually burn more efficiently at the same time. It’s win-win! I know that there are experimental ceramic engines built around this principle, and it’s about time to get them into production vehicles.
Superhot engines may be good, but superhot engine compartments are not. There’s still going to be some waste heat to manage, if only for safety. My thoughts turned to ways to take at least some of the waste heat and make use of it. By converting the heat energy into some other form of energy, say, electricity, we can simultaneously cool the engine and reclaim some of the waste. Perhaps we could even do away with the alternator, which costs a typical car a couple of horsepower. By reducing the load on the engine once again we can increase efficiency.
Unfortunately, that’s easier said than done (or it would be done already). However, with a really hot ceramic engine, I think it would be possible to use the thermoelectric effect. All you need to do is embed series of different metals along the heat gradient within the engine to create thermopiles. (More modern thermopiles are used to power deep-space probes.) Thermopiles can supply large amounts of current, but only at low voltages. With enough of them, however, you would have a cooling system that simultaneously recharged the car’s battery. If the system worked really well, you could even use surplus current to power a small electric helper motor.
So, anyone up for investing in Jer’s Radiatorless Engine? If it works, we’d make a fortune!
Get-Poor-Quick Schemes
Sometimes the road to instant poverty is not in inventing a new device but in recognizing a new market for an existing one. (Actually, since you eliminate much of the research and development costs, the chances of striking it poor are somewhat diminished, but let’s not think about that.
One bit of modern gee-whizzery of which I am fond are noise-canceling headphones. These babies actually pick up the ambient noise around you and generate their own sound waves that cancel the noise out in the location of your ear canal. Pretty dang slick. The most popular place for the technology is on airplanes; it’s amazing how much of the engine drone is cut out by a good pair of noise cancelers. With the background reduced, it’s also easier to hear the people around you.
Pilots use noise cancellers all the time these days, but if I owned an airline I’d outfit all the flight personnel with inside-the-ear noise cancellers. Not only would they be able to hear what is being said to them better, but their ears wold be protected. That constant assault on their ears can’t be good for them in the long term.
So, the technology is without a doubt useful. Yesterday it occurred to me that if you wired up the headphones with a specific signal to cancel, that you could have headphones that virtually eliminated a very specific sound while allowing others to pass. There is one industry in particular that would benefit from such a boon, a group of men and women subjected to the same sound over and over, day in and day out, until it must haunt their dreams. I expect insanity is common among these people.
You know who I’m talking about already, don’t you? That right, ice cream truck drivers. I bet they’d pay a bundle to MAKE THAT SONG STOP! As a bonus, they’d be able to hear traffic and the calls of little children more clearly.
Idle Chit-Chat
Yesterday, as I was regarding a bunch of bananas in the kitchen, I mentally dashed off this code snippet:
#typedef enum {
Banana_Green = 0,
Banana_Yellow,
Banana_Spotted,
Banana_Brown
} BananaRipeness;
#typedef enum {
Take_Banana = 0,
Hold_Out_For_Banana_Bread
} BananaAction;
- (BananaAction) takeBanana:(BananaBunch *)bunch
{
if ( (0 == [bunch count]%3) && [bunch ripeness] > Banana_Yellow ) {
return Hold_Out_For_Banana_Bread;
}
else {
return Take_Banana;
}
}
People who live in houses where banana bread is made will, of course, understand at a glance that when the bananas are getting on in ripeness and there is a multiple of three bananas remaining, one does not take a banana, but rather one holds out for banana bread, lest they face the ire of their fellow residents. Some debate is possible whether the ripeness threshold should be past yellow, as in my code here, or whether one should start holding out earlier, even though the bananas still have a few days left.
It is very good to be in a house where banana count is important.
Code notes: this is written in (more or less) Objective-C, and assumes there is already defined a collection called BananaBunch. I generally avoid multiple exit points in a function, but this one is simple enough that I decided it was OK. I haven’t bothered checking the code for errors, it’s just not that sort of exercise.
Observations
This discussion will be hampered without diagrams, but I’m not about to draw anything right now. Let’s all appreciate the fundamental property of the fishnet: when viewed straight-on, they are practically invisible, and when viewed from the side, they are practically opaque.
What this does is make the fishnet-encased leg look not just more slender, but more well-defined. The subtleties of the muscles are amplified. The curves and contours of the calf and thigh are enhanced, making the resulting skinniness a healthy, athletic sort of skinny. I am, as I write this, comparing fishnets with dark stockings (all in the name of science, of course), and the difference in leg enhancement is striking.
Idle Chit-Chat
The following is a script for a video I plan to enter in the Virgle contest to become a crew member on a Mars expedition.
Yeah, I know, the announcement came out in an April first-ish timeframe, and if the boosters were really under construction already I think I would have heard of it, and I don’t think robotics are up to the tasks expected of them in the plan, but you know what? I don’t care about any of that. Why not? Because I’m going to Mars, buddy.
Anyway, here’s the first draft of the script for my application, which will be posted on YouTube:
Mars! Hell yeah! Gas up the boosters and fasten your seatbelts, because we’ve been stuck on this rock way too long already. However, the mission to Mars is doomed without me.
Sure, I know a Higgs boson from a flux capacitor, and I know my way around computers, and I’ve succeeded in leadership positions in the past, but that’s not why Mars needs me. Virgle needs a writer, and I am the man for the job.
Whether on the back roads of America or the twisting cobbled alleys of Prague, I have spent the last several years wandering, exploring the mysteries of our planet and reporting them back to an eager public. It is more than journalism; the words must carry with them the mystery and wonder of forgotten places and the people who inhabit them. Facts are abundant these days, information ubiquitous; what is required of the writer on the Virgle mission is to convey understanding, following the progress of the first pioneers, watching as the true Martian culture develops. That is what I do.
I haven’t timed the above yet; the video is supposed to be 30 seconds. I think mine is a bit too long, and I never even got to my value as a defender of the arts in a culture that will by necessity be run by engineers at first. I never even got to say “I was born to live in lava tubes.” Oh, well; some cutting will be required, and other parts are probably awkward (hard to tell seconds after writing it). Any suggestions are welcome. Meanwhile, wish me luck!
Observations
Q: Which weighs more, a ton of feathers or a ton of lead?
A: A ton of paperwork.
Although, now that I think about it, if one were to weigh out a ton of feathers and a ton of lead at sea level, the mass of the feathers would exceed the mass of the lead. The feathers would be be more bouyant. Neither, however, come anywhere close to the crushing weight of a ton of paperwork.