Wednesday, July 22, 2009

Musical Tesla Coils

The tesla coils are actually making the sounds. This isn't just a light show synchronized to music. The tesla coils are producing the music!!!!



It is done by modulating how fast you turn on and off the coils appropriately so as to make arcs which will give the correct frequency response so as to play music.

Tuesday, July 21, 2009

Girl Genius

The webcomic Girl Genius is by far the best webcomic that I have ever seen. It was linked to me some time ago by my girl friend.

THE MOST BRILLIANT WEBCOMIC EVER!!!

I went through the series within a day or two and became current with the story very quickly. I just wanted to share the brilliance. Read the series and enjoy.

Monday, July 20, 2009

Metrics on the Reals

It has been something of a prime activity of my recent life to try and make a coordinate system for non integer dimensional spaces work. Although I have tried rather a lot of different approaches I have never really come up with anything satisfactory. For instance, at one point I considered a sort of pseudo euclidean quotient space which had the appropriate scaling law for the "volumes" of spheres by radius. However the space was less well behaved for concave sets. In fact the "volume" of a sub set of a concave set might actually be greater than the "volume" of the whole. Which at the very least means that the volume scaling law doesn't hold the same for all shapes in that space which was pretty much the kiss of death for that idea.

Other ideas have had a much longer and less clear history, for instance I have been mucking about thinking about using random coordinate systems and fuzzy logic. How random coordinate systems or fuzzy logic might be used in a concrete way to create a coordinate system I don't know. Which of course is why I still give it so much thought. One idea using random coordinate systems is to assume an infinite set of random vectors which have a particular probability distribution for the value of their dot products. Assuming uniform distribution of the vectors around the surface of the appropriate dimensional sphere gives a very specific expected dot product distribution for each dimension. If we assume a distribution somewhat in between say the 2 and 3 dimensional distributions then perhaps we would have a consistent coordinate system, albeit one with a necessarily infinite number of coordinates. This idea while pretty is something that I have not really gotten very far with. I really should put some sweat into it and see if I can make it work.

All of this is not really the point I was trying to make though (perhaps I should just rename this post and skip what I was trying to say) What I was thinking about recently is the fact that because the cardinality of the real numbers is the same as the cardinality of any euclidean space of any dimension (at least integer dimensional ones and presumably non integer dimensional ones too) you can find a bijective mapping from a space of any dimension onto the interval (0,1).

In other words as long as the cardinality of the point set of a space of non integer dimension is the same as the cardinality of the integer dimensional ones then lurking somewhere in the set of functions on the interval between 0 and 1 is the metric for any dimensional space you care to think of.

For this reason I have been thinking that perhaps the best way to try and think about non integer dimensional spaces is to think about real number theory. The kind of stuff where you talk about recursive function mappings of the real numbers for instance the mapping which we use as the basis of the decimal system. The decimal system can be thought of as the output of an algorithm which maps the interval from zero to one to itself. Say you want a decimal representation of any number. You begin by taking its integer part and then you minus that part out and multiply by 10 and then take the integer part of that and then rinse and repeat.

Perhaps by considering mappings of the unit square to itself we might come up with a suitable metric.

Wednesday, July 15, 2009

How much my blog is earning me

Interestingly I don't know how to get a good count of how many people access my blog via any other means than using the adds thing. My adds account will tell me how many people have visited my blog but my blog wont... odd. At any rate apparently the adds account estimates how much money the publisher of an add will make per thousand impressions. My site has an impressive $0.05 estimated eCPM. Since my blog has had an impressive 42 page impressions so far this month (how that happened I shall never know) I am proud to annouce that means my page is making an estimated 5.8 microbucks per hour... yup... somehow I think the amount it costs to host my page is rather higher than the payout to the advertisers. There must be some sort of power law which relates the number of blogs that make google a certain amount of money and the number of said blogs. There must be a millions of blogs that actually cost google money and then like 0.01% of them that make them money. Since the hosting of blogs is so much less bandwith and storage intensive than video it suddenly makes sense that youtube is loosing hundreds of millions of dollars a year despite its vast popularity.

Peak Posting

As is true for most things there is a point where quality and quantity of blog posts combine to make for an optimum flow of readers. In general you need volume of posts in order to draw readers but you need quality of posts in order to make them come back. But since my posts tend to have neither quality nor quantity I suppose this question is (like most everything else on this blog) purely academic.

The simplest model I can think up is that you have a quality index q between 0 and 1 which represents the likely hood of someone who stumbles upon the blog to return in the future and a quantity index p between 0 and infinity which represents how many posts you make per unit time and should sort of be vaguely help determine the number of readers you pull with those posts. I would say that probably the number of readers you pull varies something like log(p+1) Let us furthermore assume that a person has a total amount of time that they can devote to the blog and therefore the total quality of all the posts is constant so Q_total = p*q the last part of our model is how to use these factors to model reader flow. Since we attract C*log(p+1) random readers in a unit time and of those readers q of them come back we have a recurrence relation. The expected number of readers R_t+1 = qR_t + C*log(p+1). Letting L = C*log(p+1) we have R_t+1 = qR_t + L Now suppose there is a limiting number R_l = qR_l + L Solving we get R_l = L/(1-q) which is because the amount is a geometric series in q (I thought it was should have just trusted myself). So if we take the time limit we see that to maximize the number of readers that we have over the long term we should make our quality as high as possible at the cost of quantity.

Of course this was based on the assumption that quality of a post was directly proportional to the amount of time spent on it when in reality I suppose the quality is more like the logarithm of the amount of time you spend on it. Sure you can always make a post better but only perhaps if you are willing to spend some fraction again of all the time you have spent on it up to this point.

Tesla coils are cool

I have had a love of the tesla coil for a very long time. I'm not sure when it began but it was either in junior high or early on in high school.

http://en.wikipedia.org/wiki/Tesla_coil

Basically in a tesla coil you take some low voltage power source and step it up to a few kv which isn't hard. The really nifty part is where you then take that few kv and you run it through a spark gap and into the primary coil of a second transformer. The reason that this is all nifty like is because the spark takes an extremely small amount of time and has a waveform that has lots of very high frequency components. Because of this the output of the secondary coil gets a big kick both in voltage and in frequency. So you can run a tesla coil with good old 60 hz and get 10 khz out of the secondary coil. I haven't really given much thought to the design of tesla coils for the last couple years and it just sort of makes me happy that I understand the dynamics so much better now.

Tuesday, July 14, 2009

I met a guy named Stan

I was walking home with some edibles when a man walked up to me with the refrain "hey man I am just tryin to scrounge up a buck. I just want a buck for a budweiser I been walkin around so long my feet hurt just." The guy seemed earnest enough and I gave him $2. I didn't really care what it was he wanted the money for. All that really mattered was that very clearly one dollar would make a significant difference to this person whereas to me (at least at the moment though hopefully it will stay this way) $1 doesn't really make much of a difference. After I had given him the money he introduced himself as Stan and he told me that next time we met hopefully he could pay me back.

At any rate this started me thinking about utility. Now utilitarianism is the idea that one should strive for the greatest good for the greatest number. But perhaps what one should really be trying to do is maximize the total utility of a group of people. If you have 2 people with no money and no place to live and you give one of them $10,000 and 2 houses to live in the overall utility goes up. But if instead you give both of them $5,000 and each one house to live in the gain in utility will be greater. This is because for the very poor the utility of having a single dollar is very high whereas the utility of a single dollar to the average American is very low.

Music state space exploration

Obviously the state space of music is extremely large and humans will never really thoroughly explore it. At least no one particular human will since listening to all possible music sounds like one of those endeavors which would take a tad longer than the age of the universe. Of course in order to make the possible musical selections finite you need to simultaneously discretize the signal and limit its duration.

Even if we confine ourselves to sampling at a rate of say that of cd audio which is 44.1 khz or 44,100 samples a second and consider only a single minute of music that makes us consider a vector space of 2,646,000 dimensions. so even if we allow only say 100 different intensities at each time step that allows for 100^2646000 different sound bytes.

Every 1 minute sound clip (with the discretized intensity restriction kept in mind) is some point in this vector space. Now although it would be crazy to think that any human being might really thoroughly explore this space (as in listen to most of or even a tiny fraction of all possible sound clips in the space) we can still ask how well we have explored this space.

Obviously if you look at say only gregorian chant you are exploring a smaller region of the music state space than if you include also soft rock and heavy metal classical music etc.

So I propose a project that I probably will never do but intrigues me nonetheless. Why not use as a measure of the level of exploration of the music state space the convex hull of pieces of music. So we say pick a representative sample of rock music and we take the convex hull of these points in our music space and take the ratio of the volume of the convex hull to the total volume of the space as a measure of the level of exploration.

But say we took as "music" the basis vectors of the space. Then the convex hull of these "music" points would be the simplex for that dimension and while that might actually have a relatively low volume for the space as a whole it is still a volume which we can't really realistically expect our music to much out achieve and obviously the vector basis (namely a vector of one 1 and all zeroes else) is not something that really explores the music state space. So what we really want probably is to do something like take a spectrograph of the music and do our state space analysis with that.

Posting Times

I find it decidedly odd that this post was first posted about 2 minutes after the previous one but it is time stamp many hours away from the other one. I don't really like this time stamping system. It means that I can take months to finish a post but when I finally post it it will show up as though I posted it when I began it not when I finished it.

Monday, July 13, 2009

Function Spaces

One rather big surprise for me in my last little bit of undergraduate education is that both physicists and mathematicians often think of functions as being points in a vector space. This can be an incredibly powerful idea for instance the fourier transform is a projection onto a set of orthonormal basis vectors which are the appropriate family of complex exponentials. In the case of quantum physics these changes of basis take on actual physical meaning. For instance one can formulate wavefunctions as functions of position or momentum. These two wavefunctions are related to each other by a fourier transform or in other words by a change of basis. In fact the connection is even deeper than that. The heisenberg uncertainty principle is a side effect of the fact that compactly supported functions in one basis must have infinite support in the other basis. This is obviously not true of all bases we might choose (wavelet bases for instance) but the certain special bases that do have this sort of dual relationship seem to have a lot of interest for us. In fact an important part of the apparatus of quantum mechanics is using information about the commutativity of different operators. The fact that the position operator and the momentum operator do not commute implies that their bases are necessarily "inconsistent" in the sense that you can never have a wavefunction which has a finite representation in both.

But when we talk about these function spaces generally what we are talking about is L2(R) which is to say the space of square integrable functions on the reals. In general we could expand our horizons to say include L27(R) which is to say all functions for which the integral of the 27th power of that function is finite. But no matter which space you choose no integrable function space is going to include say the function x^2. It might seem odd at first that by far the most worked with function space L2(R) doesn't even include the polynomials (not any of the polynomials). But the reason is that we like dealing with functions which have a finite amount of area under their curves. This fact doesn't tend to ever be much of a problem because if you want a function which isn't in L2(R) then you just truncate it at some finite limit M and then let M go to infinity.

In fact it seems (at least for nice functions) that not only is the fourier basis a basis for functions in L2(R) but most any function on the reals. But there is of course a problem. I glossed over a little problem earlier, that is that the fourier transform of a function will not always perfectly reconstruct a function. If the function is continuous then all is well and the function is in fact exactly reconstructed. However at points of jump discontinuity the fourier transform fails to reconstruct the function and instead takes on the value of the midpoint of the discontinuity. The reason this isn't a problem is that we view functions in L2(R) to be "the same" if the "distance" between them is 0. Meaning basically that they differ only on a set of measure 0. Now when you move to functions which do not have a finite norm suddenly things become a whole lot more complicated. because the function is no longer bounded even if the function and its reconstruction from a fourier (or some other) basis differ only on a set of measure 0 there is no guarantee that the "distance" between them in the function space is 0.

Even more disturbing is that when we think about the "distance" between x and x^2 we come up with infinity. From the physical perspective it is actually a good thing that functions like x^2 are not part of the function space that is used to describe the real world. Otherwise we would allow infinite energy solutions to the wave equation. But I can't help but be deeply uneasy about the fact that there is no good way to incorporate even simple divergent functions into a nice function vector space like L2(R)