Tuesday, December 29, 2009
Star Trek and Vitalism
I've been watching all of the original series of Star Trek on CBS classics recently. Star Trek is full of conceptual contrivances for the sake of the plot. The list is almost unbounded. Faster than light travel, "humanoids" on every planet, universal English, teleportation, gravity control, etc. I'm willing to forgive most of these as stagecraft -- they either help advance the plot or are needed for obvious production reasons. There's also plenty of just plain silliness such as in Trouble with Tribbles when it is said "Odors can not travel through the vacuum of space" (of course they can) while we hear explosions from blasted space ships (which, of course, you can't).
However, one theme that annoys me constantly, and most certainly is not needed for plot advancement is the incessant evocation of Vitalism.
Vitalism is the idea that there's some sort of "elan vital" that animates the living. The idea seems obvious: living things are so different form non-living things that, surely, there must be some unseen force that defines the state of life. It is a wonderfully intuitive idea; it suffers only from the small problem that it's completely wrong as has been known now for more than a century.
The falsification of Vitalism and the unraveling of the molecular basis of life is certainly the most significant outcome of centuries of biological research. As counter-intuitive as it seems, everything we call living is "merely" chemistry -- made of the same material as dead stuff. We have explored all the way down to the bottom of the phenomenological stack and all that's there is molecules acting like molecules. There's no magic juju, there's no vital essence, there's no "spark" that separates the living from the dead. That said, just because life is made of "mere" molecules, that doesn't make it any less amazing or mysterious. Indeed, to me it makes it much more awesome and magical. I've talked to some people who seem to think that this deconstruction of biology into "mere" chemistry somehow lessens the magic. To me this is as nonsensical as saying that the transcription of poetry into "mere" letters lessens it's emotional impact.
Unfortunately, the news of the great accomplishments of the biological sciences have not infiltrated the consciousness of even the most well-educated. The ideas of Vitalism are just too intuitive to be undone by facts and thus it is still very much alive and well as demonstrated by its casual usage in "science" fiction such Star Trek.
A common example from the bridge of the Enterprise is that Spock will look into his scanner and announce authoritatively that there's only "one life form" on the planet. Inevitably they beam down and the planet is covered in alien plants. Apparently plants are not "life forms".
A more egregious example of Vitalism in Star Trek is the conflation of energy, life, and emotion. In Wolf in the Fold Spock says, "deriving sustenance from emotion is not unknown in the galaxy..." and later adds, "It's consciousness may survive consisting of billions of separate bits of energy floating forever in space, powerless." to which Kirk adds "But it will die, finally". This idea that emotion is some sort of expression of the vital animating spirit is at least as old as ancient Greece and Egypt. So too are the deistic explanations for the presence of this supposed force. And this too infects Star Trek. In Metamorphsis, Spock says to a nebulous "energy" creature called The Companion: "You do not have the ability to create life." and The Companion replies: "That is for the maker of all things." to which everyone seems to agree.
This lack of biological perspective is hardly unique to Star Trek. Pervasive in common knowledge is the idea that only things with "emotion" are "alive". If you ask people to name life forms on Earth, you'll typically get a list of big-eyed mammals. If you push hard you might get a bird. Only upon noting that things also live in the sea will most people remember fish. Forget invertebrates, nobody notices them except when whacking them with a fly swatter. And the most common life on the planet, micro-organisms, are only considered, if ever, under the heading of "nuisance" despite our total dependency on them for, well, basically everything.
Star Trek's lack of biological perspective is a real let down. Its unquestioning and casual acquiescence to Vitalism isn't a forward-looking intellectual challenge like anti-matter engines, teleportation, or sentient robots but rather is a backwards-looking reversion to pre-scientific superstitions.
Sunday, December 27, 2009
Apparently I'm everything that's wrong with the world
Good news: the source of everything that's wrong with the world has been located.
Bad news: it's me
For a Christmas eve activity, my neighborhood decided to have an outing in the park directly in front of my house. My contribution was a bonfire. As tends to happen at such gatherings, you meet some of your neighbors for the first time. One neighbor discovers that I'm the owner / builder of the interesting Gaudi-esque house we're standing in front of and proceeds to tell me how much he loves the house and how great it is that I tried something different, etc. After a little while the conversation changes to the historic housing tax exemptions that are common in my neighborhood (for which I, of course, am not eligible since my house is new). They were discussing how much money they would save on taxes by declaring their expensive beautiful houses to be historic. I casually pointed out that while I understoodd their desire for a tax break, and indeed would probably do the same thing if I was in their position, that surely they'd have to understand that I'd be against such tax breaks for obvious reasons. "Oh but what about the character of the neighborhood?" they replied. "Which character would that be?" I replied, "Faux American Colonial? Faux Craftsmen? Faux Gaudi? It's not that I don't like these houses, I do, that's one of the reasons I live here, but let's not pretend that they represent some great monument to human achievement. Again, that said, I totally understand why you guys would want to use the law in your interest and get a tax break. But if it came up for a vote, I'd vote against it."
This was not greeted well. An aggressive: "You don't think we should save historic things?" is quipped back. "I dunno," I mused, "Life includes a lot of change and renewal, sometimes we should embrace it."
And for this bit of shocking opinion on the meaning of life I am met with my neighbor angrily saying: "I can't talk to you anymore." and storming away. At first I thought he was joking because his reaction seems so out of proportion to the topic. Someone else quietly said that they agreed with me and this brought him back angrily shouting: "He said that he wants to destroy all historic things!" I replied calmly, "actually that's not what I said...." but before I could explain my position, he yelled at me while wagging his finger: "You're everything that's wrong with the world. Money! Money! FUCK YOU!!". As he stormed away I quietly replied: "Merry Christmas to you too."
For the record, my full position is that, of course we should save historic things -- I just think that we should do it collectively by purchasing landmarks with public funds and then leasing them out or preserving them. The current method that permits some people to receive a tax break for living in old, beautiful houses strikes me as an extremely inequitable tax reward exclusively benefiting a small cadre of rich people because "historic" homes are almost always in old, nice neighborhoods where the property values are high. Furthermore, the extremely lax standards of what makes something "historic" are capricious. For example, a house around the corner from me has been declared historic because a man who lived in it once was said to be a "prominent doctor" when they found a 1 inch newspaper column about him from the Statesman decades ago. (He's actually still alive so technically he's not quite "historic" yet). By these low standards, every house that has been occupied by a professional (i.e. practically every house in every well-off neighborhood) will become "historic" eventually.
The absurdity of this to me is that after I die my unique house will probably become "historic" and the owner after me will get a big fat tax break. But I, who actually did all the work to create this unique house, who literally hurt his back laying the bricks, who spent a great deal of money and effort to create something interesting that might be appreciated into the future, I get nothing. Meanwhile, my neighbor who hypocritically likes my new house yet has forgotten that something had to be torn down to build it will get a tax break for living in and maintaining a house that is supposedly in the "character of the neighborhood" despite the fact that his house is only one of maybe two or three adobe-style houses in this supposedly "historic" neighborhood.
Bad news: it's me
For a Christmas eve activity, my neighborhood decided to have an outing in the park directly in front of my house. My contribution was a bonfire. As tends to happen at such gatherings, you meet some of your neighbors for the first time. One neighbor discovers that I'm the owner / builder of the interesting Gaudi-esque house we're standing in front of and proceeds to tell me how much he loves the house and how great it is that I tried something different, etc. After a little while the conversation changes to the historic housing tax exemptions that are common in my neighborhood (for which I, of course, am not eligible since my house is new). They were discussing how much money they would save on taxes by declaring their expensive beautiful houses to be historic. I casually pointed out that while I understoodd their desire for a tax break, and indeed would probably do the same thing if I was in their position, that surely they'd have to understand that I'd be against such tax breaks for obvious reasons. "Oh but what about the character of the neighborhood?" they replied. "Which character would that be?" I replied, "Faux American Colonial? Faux Craftsmen? Faux Gaudi? It's not that I don't like these houses, I do, that's one of the reasons I live here, but let's not pretend that they represent some great monument to human achievement. Again, that said, I totally understand why you guys would want to use the law in your interest and get a tax break. But if it came up for a vote, I'd vote against it."
This was not greeted well. An aggressive: "You don't think we should save historic things?" is quipped back. "I dunno," I mused, "Life includes a lot of change and renewal, sometimes we should embrace it."
And for this bit of shocking opinion on the meaning of life I am met with my neighbor angrily saying: "I can't talk to you anymore." and storming away. At first I thought he was joking because his reaction seems so out of proportion to the topic. Someone else quietly said that they agreed with me and this brought him back angrily shouting: "He said that he wants to destroy all historic things!" I replied calmly, "actually that's not what I said...." but before I could explain my position, he yelled at me while wagging his finger: "You're everything that's wrong with the world. Money! Money! FUCK YOU!!". As he stormed away I quietly replied: "Merry Christmas to you too."
For the record, my full position is that, of course we should save historic things -- I just think that we should do it collectively by purchasing landmarks with public funds and then leasing them out or preserving them. The current method that permits some people to receive a tax break for living in old, beautiful houses strikes me as an extremely inequitable tax reward exclusively benefiting a small cadre of rich people because "historic" homes are almost always in old, nice neighborhoods where the property values are high. Furthermore, the extremely lax standards of what makes something "historic" are capricious. For example, a house around the corner from me has been declared historic because a man who lived in it once was said to be a "prominent doctor" when they found a 1 inch newspaper column about him from the Statesman decades ago. (He's actually still alive so technically he's not quite "historic" yet). By these low standards, every house that has been occupied by a professional (i.e. practically every house in every well-off neighborhood) will become "historic" eventually.
The absurdity of this to me is that after I die my unique house will probably become "historic" and the owner after me will get a big fat tax break. But I, who actually did all the work to create this unique house, who literally hurt his back laying the bricks, who spent a great deal of money and effort to create something interesting that might be appreciated into the future, I get nothing. Meanwhile, my neighbor who hypocritically likes my new house yet has forgotten that something had to be torn down to build it will get a tax break for living in and maintaining a house that is supposedly in the "character of the neighborhood" despite the fact that his house is only one of maybe two or three adobe-style houses in this supposedly "historic" neighborhood.
Monday, December 14, 2009
Absurd NY Times headline...
"Obama Tells Bankers That Lending Can Spur Economy"
In other news,
Cheney tells plumbers that pipes help keep people hydrated.
Clinton tells IT departments that working computers increase productivity.
Bush tells football players that scoring points increases odds of winning games.
Gore tells doctors that curing disease makes people healthier.
Pelosi tells real estate agents that houses may keep roof over people's heads.
McCain tells rodeo clowns that deflecting bulls' attention may improve rodeo riders' safety.
In other news,
Cheney tells plumbers that pipes help keep people hydrated.
Clinton tells IT departments that working computers increase productivity.
Bush tells football players that scoring points increases odds of winning games.
Gore tells doctors that curing disease makes people healthier.
Pelosi tells real estate agents that houses may keep roof over people's heads.
McCain tells rodeo clowns that deflecting bulls' attention may improve rodeo riders' safety.
Wednesday, November 18, 2009
Talk for EAST tour tomorrow (Thurs)
6pm at Clayworks, 1209 E. Sixth St. It's a bit of a repeat of the genetic art design talk I gave a few months back, so if you saw that you're not missing anything. Otherwise, please join us.
Tuesday, October 27, 2009
Mexican wave quiver plots
A lesson about interactivity. Having realized that I should be using quiver plots to understand the dynamics of 2-variable differential systems, I went back to the Mexican wave and made a quiver plot. In Matlab it is a slow task to tweak a parameter and re-plot over and over again so I made a zlab (C++) version of it that allowed me to twiddle the parameters in real-time.
What a difference! What took me a week before trying to understand the parameter space of this system now took me only 3 minutes. It is proof again of the power of interactive twiddling. When twiddling the variables the fast response and ability to "scratch" back and forth allows you to quickly intuit both the action and derivative of each parameter. When twiddling I was saying things like: "Oh... this is causing all the arrows on the left to go up" and "this is moving the steady-state point." I understand this system a lot better now.
In the following plots, I show two time traces at different places in space as indicated on the northwest space-time plot.
Plot 1: the stable Mexican wave. The third quadrant of the phase plot means "sitting & excitable (not tired)". Note that there is a stable equilibrium in that quadrant so if the system ends up anywhere in the 3rd quadrant then it falls into that basin and stays there until disrupted by, for example, a neighbor who pulls it towards the standing side.
Plot 2: two stable points. In this configuration, the 3rd and 4th quadrants have stable points so it simply transitions from the starting point in q3 until it gets knocked into q4. I guess if I were to hit it with a pulse of "tired" then I could get it to transition back again so this system is akin to a 1 bit memory. Haven't decided how to take advantage of this yet, but I'm sure there's something cool to be done with it.
Plot 3: oscillator. Now the equilibirum point has been removed from Q3 and so the system just perpetually oscialltes. Note that the oscillating attractor is stable -- the green and blue traces converge into the same limit cycle. I'm not positive what gives it this property, I thought that diffusion might be helping to stabalize it, but that's not the case as shown...
... in the following with no diffusion.
Plot 4: a system that has the Q4 equilibrium right on the boundary with Q1 so that it momentarily seems to be commit but then gets sucked into a small oscillator around the origin. This oscillator, however, does not appear to have a stable limit cycle so it dampens out.
Plot 5: a pattern forming system. Here Q1 and Q2 have a huge shearing force compared to Q3 & Q4. Somehow this seems to make it into a chaotic attractor but I don't really understand how yet.
Wednesday, October 21, 2009
Stability analysis
I haven't been posting for a few months because I've been suffering from another bout of depression (as I have many times before) which leaves me mostly bed-ridden and unable to concentrate. Thanks to Welbutrin and an SSRI I'm starting to get better although I still tire easily and spend many days partially in bed. That said, at least I can now concentrate long enough to get a little work done and use my brain for a few hours a day. This one blog entry has taken me about two weeks to write. Thanks to everyone who's been helpful and understanding while I've been sick.
To help with the amorphous computing projects, I've been trying to get my head around concepts of stability analysis in differential equations. In most of the textbooks I've read, stability is discussed with an analogy to balls rolling on curved surfaces such as the one below showing the ball (representing the state of some system) near an unstable equilibrium at the the top of a hill and thus tending to roll down into a stable equilibrium at the bottom (these analogies ignore the momentum -- its as if the ball, i.e. the system, is moving through viscous honey).
While these "ball rolling" analogies are helpful, they become detrimental to understanding when the functions have complex-valued curvature. This confused me for a long time until I realized that I should think about systems as fields using quiver plots like the following.
In a quiver plot, an arrow is drawn to indicate the solution to the function at each point and this permits viewing both the magnitude and direction of the field. In the above case, we see a 2D section of a counter-clockwise rotational field from the Lotka Volterra equation which is a simplistic model of a predator / prey relationship; the details of this system do not matter, suffice to say the model creates oscillating behavior as a rise in population of the prey creates a corresponding rise in the population of the predator which in turn reduces the prey which reduces the predator, etc.
If we were to start the system at some arbitrary point in this space, say 0.5 rabbits/acre and 0.4 foxes/acre and then we can integrate the system forward to get a trajectory representing the evolution of the system. In the following example, the system starts at the red star and then the blue arc is ticked off in equal intervals of time. As the rabbit population grows, so too does the fox population until there's a rapid turn around as the foxes over-hunt the rabbits causing the fox population to plummet. If we let it continue we see that it would get back to where we started and it would keep on cycling in this trajectory forever.
The idea of stability analysis is to examine such plots for patterns around the equilibria. The above case entails a fairly complex analysis, so let's start simpler and return to this case later.
Let's start instead with a simple linear system with a single stable equilibrium at the origin. No matter where we start the system, it will evolve into this equilibrium at the origin. This is a stable equilibrium as all the arrows point into the same place.
The above simple linear system is represented by:
where Z(t) is the 2-vector that is the state of the system and and M = [ -0.1 0; 0 -0.1 ]. Note that M in this case is a uniform negative scaling matrix.
Now consider the opposite: a uniform positive scaling matrix, we get the graph where all the arrows point outwards:
In this case, even if we start extremely close to the equilibrium, say at [0.01 0.01], the system diverges rapidly. This is an unstable equilibrium.
The following is the in-between case: stable in one direction, unstable in another. This is called a "saddle point" because of the shape of a saddle: curving up (from horse's nose to rear) and curving down (from side to side). This is M = [ +0.1 0; 0 -0.1 ] . In this case we have a change in convexity around the equilibrium so an approach from any direction towards the equilibrium causes a deflection. We can therefore see that only in the case that all directions point inwards will an equilibrium be stable.
So far, these systems are like the valley and the mountain analogies typically used. But now consider this linear system which isn't like those:
Here, M is a rotation matrix = [ 0 0.1; -0.1 0 ]. Here if we start anywhere we get a circular orbit. It's for this kind of linear system that the "ball-rolling" analogies fail. There is no "surface" shape that would make a ball roll around in an orbit maintaining whatever radii it started at. The "ball-rolling" analogies just don't make any sense but the quiver plot does.
Finally, for illustration, here's a case where there's rotation and a saddle point at the same time.
So, how can characterize these cases mathematically? Eigen decomposition.
First, we solve the system for the places where the d/dt is zero, i.e. the equilibria. For the above linear cases, this is extremely simple: the equilibrium is at the origin. Now, we look at the curvature of the system around that equilibrium. Again, for these linear cases, this is very simple: the curvature is the same everywhere. That is to say, no matter where you look, the percentage change of the arrows is the same.
Eigen decomposition tells us the components of curvature. Consider the following system which is unstable all directions away from the equilibrium but it is more curved (ie "more unstable") in one direction than another. In green are plotted the eigen vectors scaled by the eigen values. In this case, the eigen values are 0.1 and 0.3, both positive, telling is that this system is unstable in all directions. The eigen vector (ie. the direction of instability) doesn't really matter if we're just asking the simple question "is this stable or not?" but I've chosen to plot it anyways just for illustration -- as you can see, the eigen vectors point in the directions of maximum and minimum curvature.
The sign of the eigen values tells us about the local curvature. A system is only stable if all the eigen values are negative: i.e. all the arrows point inwards. If the system has rotation, then the eigen values will be complex valued. That's what complex value means: that there's rotation in the scale factor. For example, the following has eigenvalues 0.17 + 0.09i and 0.17 - 0.09i and you can see the rotation in the field. Note that the two eigen values are complex conjugates of each other. This is just saying that you can look at this as either clockwise or counter-clockwise rotation by just changing the sign. Complex eigen values will always come in conjugate pairs.
Another way to intuit the complex-valued eigen values is to consider the definition of eigen direction as those directions that don't change under the given transformation. Consider a rotation matrix. What direction is invariant under a rotation? Nothing in the plane of the rotation! Whatever vector is invariant must somehow be perpendicular to the plane -- and what do we call the direction perpendicular to any system? -- the (stupidly named) "imaginary" direction.
You can also see from this why the complex valued eigen values come in conjugate pairs -- both the out-of-paper and into-paper directions are valid rotational axes.
Now that we've seen positive, negative, and complex-valued eigenvalues for linear system, we're ready to look at a more complicated system. In a non-linear system there may be more than one equilibrium and the curvature may vary from place to place. However, the eigen-decomposition tool can only be used on linear systems so we look at the approximate linear system right next to the equilibrium. This is called "linearization".
For example, consider this plot for a dampening pendulum. There's two equilibria: one at the bottom (angle zero) and one at the top (angle pi). The one at the top is a shearing unstable point -- a tiny displacement either way will knock the pendulum away. By the way, the graph is periodic: read x axis 2*pi the same as zero. You can see that starting the pendulum higher near the top causes it to spin around a lot faster and more times as you'd expect.
It's taken me 2 weeks to write this part so I'll post it now and another entry later on linearization of complicated systems like this one and the stadium wave we're working on for the amorphous computing demo.
To help with the amorphous computing projects, I've been trying to get my head around concepts of stability analysis in differential equations. In most of the textbooks I've read, stability is discussed with an analogy to balls rolling on curved surfaces such as the one below showing the ball (representing the state of some system) near an unstable equilibrium at the the top of a hill and thus tending to roll down into a stable equilibrium at the bottom (these analogies ignore the momentum -- its as if the ball, i.e. the system, is moving through viscous honey).
While these "ball rolling" analogies are helpful, they become detrimental to understanding when the functions have complex-valued curvature. This confused me for a long time until I realized that I should think about systems as fields using quiver plots like the following.
In a quiver plot, an arrow is drawn to indicate the solution to the function at each point and this permits viewing both the magnitude and direction of the field. In the above case, we see a 2D section of a counter-clockwise rotational field from the Lotka Volterra equation which is a simplistic model of a predator / prey relationship; the details of this system do not matter, suffice to say the model creates oscillating behavior as a rise in population of the prey creates a corresponding rise in the population of the predator which in turn reduces the prey which reduces the predator, etc.
If we were to start the system at some arbitrary point in this space, say 0.5 rabbits/acre and 0.4 foxes/acre and then we can integrate the system forward to get a trajectory representing the evolution of the system. In the following example, the system starts at the red star and then the blue arc is ticked off in equal intervals of time. As the rabbit population grows, so too does the fox population until there's a rapid turn around as the foxes over-hunt the rabbits causing the fox population to plummet. If we let it continue we see that it would get back to where we started and it would keep on cycling in this trajectory forever.
The idea of stability analysis is to examine such plots for patterns around the equilibria. The above case entails a fairly complex analysis, so let's start simpler and return to this case later.
Let's start instead with a simple linear system with a single stable equilibrium at the origin. No matter where we start the system, it will evolve into this equilibrium at the origin. This is a stable equilibrium as all the arrows point into the same place.
The above simple linear system is represented by:
where Z(t) is the 2-vector that is the state of the system and and M = [ -0.1 0; 0 -0.1 ]. Note that M in this case is a uniform negative scaling matrix.
Now consider the opposite: a uniform positive scaling matrix, we get the graph where all the arrows point outwards:
In this case, even if we start extremely close to the equilibrium, say at [0.01 0.01], the system diverges rapidly. This is an unstable equilibrium.
The following is the in-between case: stable in one direction, unstable in another. This is called a "saddle point" because of the shape of a saddle: curving up (from horse's nose to rear) and curving down (from side to side). This is M = [ +0.1 0; 0 -0.1 ] . In this case we have a change in convexity around the equilibrium so an approach from any direction towards the equilibrium causes a deflection. We can therefore see that only in the case that all directions point inwards will an equilibrium be stable.
So far, these systems are like the valley and the mountain analogies typically used. But now consider this linear system which isn't like those:
Here, M is a rotation matrix = [ 0 0.1; -0.1 0 ]. Here if we start anywhere we get a circular orbit. It's for this kind of linear system that the "ball-rolling" analogies fail. There is no "surface" shape that would make a ball roll around in an orbit maintaining whatever radii it started at. The "ball-rolling" analogies just don't make any sense but the quiver plot does.
Finally, for illustration, here's a case where there's rotation and a saddle point at the same time.
So, how can characterize these cases mathematically? Eigen decomposition.
First, we solve the system for the places where the d/dt is zero, i.e. the equilibria. For the above linear cases, this is extremely simple: the equilibrium is at the origin. Now, we look at the curvature of the system around that equilibrium. Again, for these linear cases, this is very simple: the curvature is the same everywhere. That is to say, no matter where you look, the percentage change of the arrows is the same.
Eigen decomposition tells us the components of curvature. Consider the following system which is unstable all directions away from the equilibrium but it is more curved (ie "more unstable") in one direction than another. In green are plotted the eigen vectors scaled by the eigen values. In this case, the eigen values are 0.1 and 0.3, both positive, telling is that this system is unstable in all directions. The eigen vector (ie. the direction of instability) doesn't really matter if we're just asking the simple question "is this stable or not?" but I've chosen to plot it anyways just for illustration -- as you can see, the eigen vectors point in the directions of maximum and minimum curvature.
The sign of the eigen values tells us about the local curvature. A system is only stable if all the eigen values are negative: i.e. all the arrows point inwards. If the system has rotation, then the eigen values will be complex valued. That's what complex value means: that there's rotation in the scale factor. For example, the following has eigenvalues 0.17 + 0.09i and 0.17 - 0.09i and you can see the rotation in the field. Note that the two eigen values are complex conjugates of each other. This is just saying that you can look at this as either clockwise or counter-clockwise rotation by just changing the sign. Complex eigen values will always come in conjugate pairs.
Another way to intuit the complex-valued eigen values is to consider the definition of eigen direction as those directions that don't change under the given transformation. Consider a rotation matrix. What direction is invariant under a rotation? Nothing in the plane of the rotation! Whatever vector is invariant must somehow be perpendicular to the plane -- and what do we call the direction perpendicular to any system? -- the (stupidly named) "imaginary" direction.
You can also see from this why the complex valued eigen values come in conjugate pairs -- both the out-of-paper and into-paper directions are valid rotational axes.
Now that we've seen positive, negative, and complex-valued eigenvalues for linear system, we're ready to look at a more complicated system. In a non-linear system there may be more than one equilibrium and the curvature may vary from place to place. However, the eigen-decomposition tool can only be used on linear systems so we look at the approximate linear system right next to the equilibrium. This is called "linearization".
For example, consider this plot for a dampening pendulum. There's two equilibria: one at the bottom (angle zero) and one at the top (angle pi). The one at the top is a shearing unstable point -- a tiny displacement either way will knock the pendulum away. By the way, the graph is periodic: read x axis 2*pi the same as zero. You can see that starting the pendulum higher near the top causes it to spin around a lot faster and more times as you'd expect.
It's taken me 2 weeks to write this part so I'll post it now and another entry later on linearization of complicated systems like this one and the stadium wave we're working on for the amorphous computing demo.
Tuesday, October 20, 2009
Monday, October 19, 2009
Talk at Council for the Advancement of Science Writing
Just gave a talk for a conference of science writers. They shot some (not so high quality) video of it viewable here.
The slide deck is here.
The slide deck is here.
Tuesday, September 8, 2009
New paintings by Heather Jarry
I commissioned a set of watercolors from Heather Jarry, a friend I've known since 6th grade. I adore Heather and her work and wanted to fill my house with her playful, colorful images. A few months ago we went down to the UT life science's library and I showed her a bunch of images that inspired me ranging from the research plates of the 19th century expedition of HMS Challenger to the molecular renderings of David Goodsell. I'm thrilled with the results. Be sure to click through on these images and see the details. Now I just have to figure out where I'm hanging all this new artwork!
A river of fireflies, inspired by the stories of synchronized fireflies from Strogatz.
Closeup of the fireflies
Inspired by microscopic drawings from HMS Challenger
Inspired by a diagram in Visual Complex Analysis
"Actin and Myosin", inspired by a drawing in Machinery of Life by David Goodsell
Water.
Study #1, elements of the Myosin, Actin can be seen here
Study #2
Study #3
A river of fireflies, inspired by the stories of synchronized fireflies from Strogatz.
Closeup of the fireflies
Inspired by microscopic drawings from HMS Challenger
Inspired by a diagram in Visual Complex Analysis
"Actin and Myosin", inspired by a drawing in Machinery of Life by David Goodsell
Water.
Study #1, elements of the Myosin, Actin can be seen here
Study #2
Study #3
Wednesday, August 12, 2009
A flag for the Nerd Republic
Friday, August 7, 2009
Thinking like a chemist
Photo from flickr user zcreem
Suppose you were asked to mass produce a toy train car -- four little wheels connected to a small wooden chasis. Being an inhabitant of the 21st century you'd know exactly what to do: build an assembly line. After some tinkering you'd end up with some sort of jig that held the body into place and attached the wheels in a nice predictable fashion so that it could be repeated rapidly. Henry Ford would be proud of you.
But what if the wheels of the car were as small as atoms and the chassis a single molecule? Then how would you do it?
Such molecular assembly has been done for a long time, it's called chemistry. But chemists don't think about the assembly problem the way Henry Ford did. Their approach is fundamentally different.
A chemist would build the molecular toy car by putting four bazillion copies of the wheels into a bag full of water with a bazllion copies of the chassis and then they would shake the bag intensely assuring that some fraction, perhaps a minuscule portion of the original, would assemble themselves *by accident* into the toy car.
A chemist would then come up with a way to separate the fully assembled cars from all the left over parts that failed to assemble -- perhaps the vast majority of the pieces. For example, the chemist might dump the contents of the bag out over a pine tree. The un-assembled pieces, being smaller than the fully assembled pieces, might fall through the branches more easily while the the larger assembled pieces would be more likely to snag a branch and get stuck on the way down. As a result, the top branches of the tree would be more likely to hold the desired product. Then a chemist would snip off the top half of the tree and shake out the contents and repeat the process, knowing that for each repetition they have purified the sample a little bit. Having never even laid eyes on the target, they would declare that their end product was, say, 99% pure.
Seems absurd? It is. But it's also incredibly clever -- it permits the manipulation of atomic scale things by exploiting the fact that you are much, much larger than they are and can therefore easily move around quintillions of molecules inside of a "bag" no bigger than a drop of water. As a filter they'd use something like gelatin which at the molecular scale is a lot like the pine tree -- a big furry mess of interconnecting obstacles that would let some things pass though easily while inhibiting the movement of other things. As hard as it is to believe, this technique is accurate enough to allow separation by incredibly tiny differences in mass. Below is a picture of an actual gel, the light pink parts are the molecular batches (in this case DNA) that have been pulled through the gel which is the purple background. You can make out six tracks in this gel which is six different runs.
photo from wikicommons Gel_electrophoresis_2.jpg
Below is a picture of someone loading a gel. You can make out 10 "lanes" they are loading for their experiment. Into each lane they are placing a tiny drop of water using a pipette which is just a fancy eye-dropper. Each drop they are inserting into the gel might contain billions upon billions of the molecule of interest.
Photo from flikr user rocksee
Software prototypes
(Images adapted from flickr users Duke TIP and Patrick Beeson)
One way in which software engineering differs from other engineering disciplines is that in software the prototype is often confused with the real thing.
Nobody looks upon a prototype 1/50th scale model of a bridge and says "Looks done, let's drive trucks across it now." Yet in software development such sentiment is commonplace -- "Looks like it's working, all we have to do is clean up the bugs and ship it!"
If this were merely a misunderstanding between the programmers and the business-types it would be understandable, but the unfortunate fact is that it's often the programmers themselves who believe this. This attitude of hack-and-patch contributes to the general lack of quality of software compared to other engineering disciplines and this is compounded by the perceived low-cost of failure. Structural engineers don't say to themselves: "If it doesn't work we'll just patch it in the field." Electrical engineers don't say: "Ahh, sort of works... we'll upgrade it after tape-out." It has never occurred to a mechanical engineer that they could hide their lack of quality control by creating an automatic update system that secretly updates their wares behind their customer's backs.
For software engineering to be done right -- like in every other creative discipline -- time and space have to be allocated for building *disposable* prototypes. There is no progress without failure, but you don't have to subject your customers to your failures either.
Wednesday, July 29, 2009
A month of web coding
(Clever mug from stevenfrank)
I haven't posted anything in the last month as I've been on a web-coding sprint for our new bioinformatic enterprise: "Traitwise". This was the first time I've done any serious web-based development since about 1997. It hasn't changed much -- it's still a disaster.
The list of things that are wrong with web development would fill a book so here's my really short summary.
D/HTML is a disaster. It made a tiny bit of sense in 1994 when pages were, briefly, 99% text and 1% mark up. But now, even reasonably simple pages turn into 99% inefficient layout gibberish and 1% content. So the semantic premise of a web page has been inverted. Sarah told me that I should switch to the meta markup languages like HAML and she's probably right, but I didn't find out about that until too late.
CSS is a disaster. Obviously a committee with no programming experience and little vision of where the web was going came up CSS because only those ignorant of programming would be dumb enough to use "-" as a delimiter. But that's just a trivial gripe: the entire design of CSS is flawed. The base HTML semantic tags "p", "a", etc are not useful, only were for about 6 months in 1994, and now every page devolves into zillions of divs and spans each with a specific class moniker so you end up with a flat CSS "hierarchy" thus nullifying the CSS design and turning every page into a giant, un-readable mess.
JavaScript is a disaster. Actually, the core language is mostly OK but the portability -- the thing that really matters -- is a disaster. Thanks Microsoft! Oh, and also thanks to Google -- Chrome has broken JS even more. Chrome is the first product from Google that really pisses me off in a Microsoftian kind of way -- making the world a WORSE place instead of a better place. Attention Google, we don't need any more non-standard changes to the JS API. Please, just back away slowly from the browser market and let Firefox and the Internet standards committees lead the way. You're not going to profit from it anyway so please, just say no.
SQL is a (continuing) disaster. The inefficient mapping of the most rudimentary problems onto the relational database model is just plain wrong. The world needs a standard simpler transactional hash object that would do most of what you want as a web developer and be a lot simpler and faster. This is especially relevant given that environments like RoR are just building and mapping all these relationships internally thus nullifying the point of a relational database. RoR might as well just abandon the database and use its own transactional hash-oriented file system. The only reason they don't do so, one assumes, is the momentum of legacy databases.
Flash/Flex/AS3/MXML is a disaster. Let's sart with the marketing. What is the name of this product? Flash became Flex but is wrapped in MXML? Or is it AS3? Or is Flash the cleint-side run-time? Why do you compile .as3 files with an MXML compiler? WTF guys, how about version numbers, try them, they're great. I'm sitting next to Rob, a former Adobe developer, and even he doesn't understand the names -- we had a 15 minute argument sorting out which part of this product line is named what. There's so many confusing and broken things in Flash/Flex/As3/MXML/WhateverItsCalled I could go on for hours. I wasted untold days sorting out the simplest, stupidest things. I put "FLEXHACK" in my code next to every work-around or counter-intutive hack (like putting +5 on every textWidth) there must be 100 of those tags in my code and I got tired of putting them in after a while. Really basic concepts of object oriented programming are just flat out violated by their awful Flex design, for example the unclear dynamic typing, the UIComponent mess, and the lack of deep object duplication. But really, I could go on and on.... Like, how about the secret *deleting* of subversion controlled files off my hard-drive that the IDE didn't own -- that was just great! Or the secret deleting of comment lines at the top of the files in the IDE. Or the screwed up caching of a SWF in the wrong folder that frustrated me for several painful hours.)
The only thing that isn't a development disaster in my month-long experience was Ruby on Rails. There were a few odd things about it that threw me off (it was much stricter about type casting than I assumed it would be) but mostly it made perfect sense and Rails is obviously the work of a professional. Everything about Rails from the docs to the API's demonstrated that the author(s) knew what they were doing. I was impressed.
Thursday, July 9, 2009
The nerd peacemaker
Wednesday, July 8, 2009
Updated birds and bees
Daddy, where do babies come from?
Honey, when grown-ups love each other very much and decide to have a baby, which they do usually in their late thirties or early forties, they call an embryologist.
Em-bry-ol-ogist?
Yes dear. An embryologist gives the mother-to-be, assuming she's not just the egg-donor mother, in which case she'll be the biological mother but not the legal-mother, special shots which control her ovulation and then extract an egg from her ovaries under anesthesia. This is a tender act that only grown-ups do where the embryologist monitors the mother's follicles with ultrasound and may resort to a hormone antagonist to get the timing just right. Then the daddy-to-be, again assuming he's not just an anonymous donor in a cryobank, goes into a little room and uses provided magazines, or the gay magazines that are hidden under the sink, to auto-erotically put his germ-line in a dixie cup and gives it to a nurse. The two fluids are mixed in the precious beaker-of-love and that makes a zygote -- or, more typically, several zygotes.
Babies comes from goats?
No honey, not goats, ZY-gotes. Zygotes are single-celled fertilized eggs.
So then you have a baby?
Well, some people think so. Others think they're just tissue, like your skin or liver. Either way, the embryos get put in storage and whether or not you believe they are babies, everyone seems okay with freezing them solid.
Babies are frozen? Like popsicles?
Yup, that's how they come. Little babysicles. You defrost them like TV dinners and then you implant them in the mother's uterus, or the surrogate mother's uterus if the legal-mother-to-be can't or doesn't want to carry to term. But before you can do that, the embryos are graded for quality by how fast they grow.
Graded, like in school?
Yeah, like that, except those that don't win this race are destroyed.
You mean they're killed?
Well, some people think that. But then again, those slow ones were probably not going to implant much less make it to term so they would have died anyway.
Teacher said that my friend Tommy's not ever going to accomplish anything because he's slow since he goofs off. Are they going to destroy him?
Well, no, Tommy's not an embryo.
So, they should have been destroyed him when he WAS an embryo because he's slow?
Well, no, I mean, unless he was slow as an embryo, then yeah, I guess so. Anyway, pay attention, because this is where the act of love gets complicated since it's at this point where different insurance regimes have different policies. See, the procedure of baby-making is expensive, and the insurance companies in the US don't want to pay for more than one procedure so this puts pressure to implant more than one at a time. This increases the odds that at least one of the embryos grows to term but it's risky because you might get twins or triplets or even more sometimes. But in countries where there's single payer insurance then they just implant one because costs are better controlled. And that, honey, is why you have a fraternal twin brother.
But you said they plant three?
IM-plant three sweetie, not plant three. But yeah, they do, I mean, they did. You're sister or brother didn't attach so he or she didn't come to term.
I'm sad.
Yes honey, but not as sad as mommy and daddy were when the first two attempts at in vitro failed. The deductible almost killed daddy because back then daddy did contract work and could only afford catastrophic.
Cats a in trough?
No honey, "catastrophic" -- that's when the insurance company doesn't want to pay for baby making.
But what about baby sister? Why doesn't she have a twin?
Well, just to clarify, "baby sister" as you call her is actually older than you. See, she came from one of the frozen embryos from the first round of IVF because we switched back to the first embryologist on our third try because that doctor was then in-network to our HMO plan. So actually little sister was conceived two years before you, stayed frozen until you were three and was then unfrozen and implanted last year. She doesn't have a twin because her other two siblings didn't make it.
They died?
Well, yes, if you think they were alive in the first place. But that's something you'll have to decide on your own as you grow up.
I don't like baby making! I'm never-ever going to make babies! I don't want to talk about this anymore! WAHH! NO! NO! NO!
Listen, honey, you behave. Remember, we froze you once and we can freeze you again!
(Tip of the pen to Rob and Steve at lunch today)
Sunday, July 5, 2009
Communication is not a luxury
Friday, July 3, 2009
Understanding logic level conventions
Over lunch John clarified a few things for me about the nomenclature used for transfer functions.
A "transfer function" is the model of how a gate/amplifier behaves. Given an input level (voltage for an electrical device or molarity for a chemical one) the model describes the equilibrium (or steady-state) output level. The above graph illustrates a hypothetical transfer function.
The main point of confusion for me was "What exactly is the definition of 'gain'?" and "By what convention are logic levels defined?"
John pointed out that the word "gain" is an over-used / abused word. Many people over-simplify the transfer function graph above and use 'gain' to mean different things. The gain is the slope -- but as you can see the slope of the function is different at different input levels so these is no such thing as "the" gain for a gate.
In the middle, linear range, the slope is roughly constant over an input domain. When building analog devices it is this roughly-linear region that is of interest and so an analog engineer would probably refer to the approximately-constant slope in this linear region as "the gain".
However a digital engineer uses the wider non-linear range to encode a binary variable. In this case, we must now have a convention that defines the logic levels. The electrical convention for this is that the two places where the slope, aka the "incremental gain", are equal to 1 are the places that define the inside bounds of the logic levels. Anything outside of these bounds are considered valid logic levels. Anything inside of them are considered "undetermined". The nominal values (the desired levels to be obtained by any gates) are defined by a "noise margin" outside of these inc. gain=1 points.
Monday, June 29, 2009
Glazed fountain spouts
My friends John and Chris Gray at Clayworks glazed and fired the spouts I built last week. They look very nice. Next step is to mortar them in to place -- which is going to be a pain because it is now 103 degrees outside!
Friday, June 26, 2009
Edge Detector Paper
The genetic edge detector paper just came out in Cell! Congratulations to Jeff and everyone else who worked on this paper. This is a project that we hatched about 3 or 4 years ago and it is finally out after a lot of hard work by everyone involved except me :-).
The project engineered bacteria to act as a communal signal processor implementing an "edge detector". You can think of the engineered bacteria as being like very simple computers, each running the following program: "Am I in the light? If so, shout to my neighbors. Otherwise, if I'm in the dark and I hear my neighbors shouting then raise my hand." Those that are in the dark and hear a neighbor must be near an edge. The "shout" is implemented by having the cells produce a small molecule which diffuses to their neighbors to be "heard" (actually, "smelled" is a better description). The "raise my hand" is implemented by having the cells produce a dark sugar which is visible to the naked eye when you look at the plate.
Interestingly, natural cells implement this edge-detection algorithm: the retina -- the first stages of image processing in the eye is to extract edges by a similar algorithm. The Nobel prize was awarded in 1967 to Hartline for this discovery in the retinas of the horseshoe crab.
Saturday, June 20, 2009
Fountain spouts
Monday, June 15, 2009
Bed stain
Monday, June 8, 2009
Bed
I haven't been posting house progress for a while. My night-time project for the last week has been construction of a bed with a little bit of a floating cloud theme. I laminated four 4x8 sheets of maple plywood together and then cut out circles of various radii.
After Alex's sanding for many hours...
Here's the rough-cut end table before I cut out the circles...
After Alex's sanding for many hours...
Here's the rough-cut end table before I cut out the circles...
Friday, May 29, 2009
Molecular model transfer function
Today I got around to trying out a simplified molecular version of the gate model that will replace my hyperbolic function.
The kinetics are all arbitrary for the model, but the shape of the transfer function looks even better than the made-up model from before. There's an almost perfectly linear section in the middle -- it looks more made-up than my made-up model! This is assuming that all three reactions have the same strength. Next, I need reasonable terms for the three reaction rates.
The kinetics are all arbitrary for the model, but the shape of the transfer function looks even better than the made-up model from before. There's an almost perfectly linear section in the middle -- it looks more made-up than my made-up model! This is assuming that all three reactions have the same strength. Next, I need reasonable terms for the three reaction rates.
Subscribe to:
Posts (Atom)