Sunday, November 30, 2008

Door panels 2nd panel and stain

It's taking more than an hour per panel but it feels like I could get it under an hour once I get good at it. There's nearly 100 panels in the house, this is obviously not going to be something I do all myself. I think I'll finish up this door as a prototype and then wait until I buy a big mill or have a mill shop do the rest. Either that, or hire some hourly labor for about 100 hours.

Friday, November 28, 2008

Molecular and Cellular Videos (External Link)

OK, I thought I'd keep my blog mostly about only my projects but sometimes one runs across something really cool and blogging about it increases its Google score. My friend Eric Siegel at NY Hall of Science sent me this link to large collection of nice molecular and cellular animation videos.

I love videos like this. That said, I do have a very big complaint about the non-simulations (most of them) -- they make molecules appear to be intelligent agents. Molecules do not make deliberate choices; they do not see a complex forming and then think to themselves: "Hey, I think I'll whiz over there and insert myself into that growing structure!" For example, see the microtubule growth in Inner Life.

It is completely understandable that the animators of these videos have a hard time capturing the reality of molecules because the velocities at which things happen at the nano-scale are extremely difficult to comprehend and thus it is hard to create these animation without resorting to the "cheat" of "deliberateness". Unfortunately this cheat creates a major confusion -- I know because I remember being confused! In Segan's wonderful Cosmos series, there was an animation of DNA polymerase with its reagents all flying across the screen to assemble themselves into a growing polymer. I distinctly remember as a nine-year-old thinking: "How do the parts know where to go?" No one told me that 1) that's a great question and 2) they don't.

Here's the way animators to create these effects. They place the pieces of the model together in their final configuration and then they tell the animation program to fling all these pieces away in random directions with random tumbles. Then they simply play the animation backwards to create the effect of the individual molecules assembling themselves into the formation (that's the easy way to do it anyway). It creates the lovely assembling effect but it is a lie -- a very, very interesting lie.

Think about it -- in order for the animators to make it look like the molecules know what they're doing they have to run time backwards. That isn't merely a statement about animation -- it affords a deep insight into thermodynamics. Things which "know what they're doing" are, in effect, "running time backwards". Getting your head around this idea is the key to understanding what life is, why perpetual motion is impossible, and failing to understand it is central to many misconceptions especially among creationists.

Molecules don't know where they are going. They just thrash around randomly due to collisions. The sum of all that motion is what we call "heat" -- more heat, more violent thrashing around. If you were to put some molecules in a little pile they would bounce off each other spreading out into a more diffuse pile. Why should they spread out and not stay put or even compact themselves tighter? Because, as long as they aren't interacting with each other (we'll come back to this case) there are a lot more ways to be spread-out than there are to be compact. Scientist call this by weird name "entropy" -- it's the second law of thermodynamics: entropy (spread-out-ness) is always increasing. It's an idea that's so simple and yet so profound. Why is it true? Nobody knows; that said, try to imagine what the world would be like if it were false.

Suppose that molecules spontaneously created little ordered piles without interacting (again, we'll come back to interaction case). Those little piles are information. In other words, you could look at them and say: "Hey, there's a little pile there that shouldn't be -- since they aren't interacting they should have spread out, thus, something must have put them there." And then what? What are these little piles of spontaneous information forming? Are they spelling out Shakespeare? Or drawing a picture of a cat? Or writing out a cryptic secret that we can't read? See, it's nonsense; you can't turn it around. When you try to imagine a world that doesn't spread-out spontaneously then you end up with a world where information spontaneously appears out of nowhere and such a world would be indistinguishable from one where time was running backwards. In other words, the concepts of time and increasing entropy are the same concept.

Here's another way to think about it. Suppose that you had a tiny ball in a tube trap. Say the ball can be on either side of the tube: left or right. If the ball and tube are not interacting in some biased way then there's just as much chance that you'll find the ball on the left as the right side. Say you tried to use this tube as a memory device with the position of the ball meaning different things. You reach in and move the ball to the left side and then shut the trap and hand it to over to a friend who examines it. You shouldn't be surprised that when they open it they are just as likely to see the ball on the right as the left. This is a terrible memory device! The reader of the information might as well have just flipped a coin instead of relying on this thing to remember what you entered. How would you fix this? You'd have to glue the ball in place somehow to prevent it from moving. So, how would you glue it? There's lot of ways, you could introduce a chemical bond that stuck the ball and tube together or you could jam in a plug or lots of other clever contraptions. But every way of "gluing" will have the same requirement: it will need an investment of energy. In other words, an investment of energy is the same thing as information. If you see a pile of energy laying around somewhere then you know that such a pile potentially holds information (what that information encodes or means, that's a totally different question). And vice-versa, if you know some information then it must be that case that energy was invested to make it known. The two concepts -- information and free-energy -- are the same concept! And this explains why you can't build a perpetual motion machine. If you could then it would be creating information out of nowhere which is the same thing as time running backwards. Or, to put it another way, if you do build a perpetual motion machine then (just try) to stay the hell away from it because that thing is running time backwards!

And this gets us back to life. If it is the case that things can't spontaneously assemble then how can there be living things which are made from spontaneously assembled molecules? The fact that life is so information rich, is this evidence that something made the investment of free-energy? Yes. Shall we call this investor of free energy some sort or god or spirit or vitalistic force? That's a reasonable question, and I've seen this argument in creationist literature, but the answer is: no.

This gets us back to the videos and what's wrong with them. The videos make it appear that molecules "know" what they are doing. The seem to "know" that they should fly through space and attach themselves to some cool growing nano-machine. But they don't. What they do instead is much more interesting. They bounce all over the place without knowing squat. Why don't the spread out? They do, but they are held inside of a bag -- the cell -- which keeps them contained. When they bounce around they accidentally find molecular partners with whom they interact. This is very different than what I described before with the ball in the trap where we assumed that there was no interaction. Now, there is interaction -- they stick like glue. As described, such gluing requires energy. Where does the energy come from? It is pumped into the cell from the outside. And when the interactions break, that energy is released at higher entropy (time moving forward) and that entropy is pumped outside of the cell to keep it from poisoning the inside. Living things are devices that invest free-energy from their environment to temporarily increase the information inside of the cell. This is only possible because they have access to the free-energy; no free-energy, no life. By the way, there’s lot's of things do this, not just life. For example, a whirlpool is a pretty clearly defined "thing" that it is possible because free-energy in the form of rushing water gets trapped into a shape that then dissipates the entropy out the bottom. Whirlpools, and living things, are not "things" in the sense that they are persistent collections of molecules -- they are things in the sense that they are persistent patterns of molecules -- the molecules themselves just pass right through.

What makes life really interesting and different from a whirlpool is that it is a self-contained computational device that stores the changeable instructions to copy itself. A whirlpool's pattern is created by the external circumstances around it -- the pattern of the rocks and the waterfall. In contrast, living things internalize the "circumstances" that build them (the DNA, the proteins, etc) thus living things can be viewed as a single package that makes decisions and evolves as a computational whole. The magic of living things is that no individual part (the molecules) "knows" what it's doing (my problem with these videos) yet the ensemble does "know" what it's doing! When we casually look at a living thing we can't easily track the energy flux in and the entropy flux out and thus living things appear unique, as if they were running time backwards -- exactly the trick the animators use to make the (wrong) animations. Ha!

Thursday, November 27, 2008

Amorphous computing experiments in matlab

I've been playing with what I hope will be an interesting formulation of amorphous computing simulations involving randomly generated logic networks. I first prototyped these in C in my zlab framework but have decided to move them to matlab both to make it easier for others to work on it but also because as I move them from 1D to 2D I'll need a fancier integrator than RK45. Matlab offers a lot more ODE solvers than does my current C framework where I would inevitably have to port in Fortran solvers.

The above figures show the first test results from the matlab code. A three-node ring oscillator (that's 3 "not" gates connected in a cycle) are arrayed across space (x-axis). In both figures, the osciallator at randomly initialized (the same ICs in both images) and thus begin to oscillate though time (y axis). In the first image, there is no communication between each spatial machines so each vectical stripe oscillates in its own arbitrary phase. In the second figure, the exact same machine and ICs are now allowed to exchange information through space by diffusion and you can see that there is a rapid phase alignment between the vertical stripes. Think of it like this: each machine is now trying to recruit its neighbors into its phase. At start, by chance, there will be some neighbors who happen to have similar phase and thus they will be able to dominate their neighbors and bring them over to their phase resulting in a larger dominating force and thus making it easier to dominate even more neighbors, etc, until the whole space phase synchronizes.

This effect has been known for centuries -- it was described by Huygens in 1665 when he noticed pendulum clocks hung on the same wall phase-synchronizing because they could communicate by vibrating the wall. Here's an article about a nanomachine that does the same thing.

Lots more of these results to come now that I have the basic matlab framework built. Early indications are that some interesting things are possible.

Tuesday, November 25, 2008

Kinetic Explorer v2.0 Released

This is a reaction simulator and data fitter project that I started years ago with Ken Johnson and Thomas Blom. We have just released version 2.0 which includes substantial improvements in the integrator and includes a nice tool for viewing the parametric fit space. After playing with this for years now, I'm convinced that the major problem with fitting tools is that it is incredibly easy to fool yourself into believing that you have a well constrained system when you don't. In this and the upcoming version we've put enormous effort into a UI that can demonstrate if a system is well constrained and if not, why. Thanks to a lot of effort by my bestest-nerd-buddy John Davis, v3.0 will have a brand new super-optimized fitter that uses singular value decomposition to dramatically improve the fit descent and also provide instant feedback on the system's condition rank in signal to noise units.

Door Panels -- Milling experiments

I started on milling a prototype panel. I thought that choosing a panel with large simple geometry would be the easiest, but I was wrong. Because the cuts were larger than the router base, I kept having to shove in awkward pieces of thin plywood as a scaffold to replace the support lost from the removed material. I experimented with using different depths of cut for the different branches but it was unnoticeable so I instead experimented with a dado line between branches to mark a visual boundary but I think that this too is unnoticeable so I will abandon that in all the future cuts. This prototype ended up pretty ragged but it is the bottom panel of a workshop door so I probably won't bother replacing it. The picture shows the panel before staining.

One unexpected thing that I like is that the inner layers of plywood have defects and I think that the knots add to the feeling of the tree I'm looking for.

Door Panels

Last night I started on door panels. I had wanted to do something decorative with the doors but during construction it became clear this project would have to wait. Bruce did a beautiful job on the door fabrication and made it so the panels were easily removable. Tonight I began by reviewing my pics folder for trees and I found a nice one of my backyard pecan taken last winter. I setup the projector and then traced various branches onto the doors.

Tracing a natural object is a really good exercise. What you think a tree looks like in your mind and how it actually looks are so different that it's quite stunning. The cartoon vision in one's head has branches always spreading upwards and outwards. When I close my eyes I can see knotty branches but when you actually trace it out you realize that only the major branches are knotty enough to notice. In my cartoon vision, the smaller branches fork fairly regularly but tracing it makes you realize that it is actually very haphazard. Trees and not the result of a nice simple construction rule executed recursively but rather of construction and *destruction*. Without the fallen and broken branches trees look simulated.

I'm thinking of varying the depth of the cuts and hence the numbered sections. As usual with my projects, I have no idea if this is going to work. If it doesn't, oh well, I can replace it with just a sheet of plywood.

Monday, November 24, 2008

Planter masonry

I've started on the planter masonry in the front of my house. I want a roughly exponential spiral that appears to have somehow grown naturally in place. I also want it to afford a comfortable conversation with the front steps. Unfortunately I didn't realize how unlevel this part of the sidewalk foundation was until after I started laying bricks. I had wanted it a little out-of-level to promote drainage but it is a lot more noticeable that I thought it would be -- as you walk up from the neighboring house you're eye compares the lines of the planter to the front porch brickwork and it is very clear that they are out of sync. So I've change the design so that top part of the planter is deliberately crooked to exaggerate the effect in a "if you can't beat it, embrace it" design. Inevitably this limitation pushed me to a new place I wouldn't have gone and I like the new design better in some ways.

This is something that I really like about masonry -- you are forced to commit. In many ways, masonry is the exact opposite of software engineering. Software has a neverworld feeling: it is light, squishy, virtual, and totally forgiving -- if you screw up you just revert the version control. Masonry is heavy, real, and completely unforgiving -- when you screw up you either live with it or get out a sledge hammer. (One step I didn't like took me over a week of pounding with a hammer and chisel to remove -- about twice as long as it took me to build it in the first place.) Software's undo button permits a kind of intellectual laziness where anything that isn't exactly how you imagine is cast as merely a "bug" awaiting correction. With masonry you are forced into finding ways to convert mistakes into features. It is challenging but creatively healthy. I find myself everyday sitting on my porch for a few minutes staring at this pile of bricks and moving them around trying to decide what happens next. Then I lay the next course and think again.