« Posts by MadRocketSci

Levi-Civita Matlab Function

I banged out a quick matlab script for implementing something that has turned up quite a bit lately in my mathematical investigations: The Levi-Civita symbol.

The Levi-Civita symbol turns up in certain definitions of the determinant (including some definitions of partial determinants), and also in Grassman and Clifford Algebra (the branch of linear algebra dealing with the construction of higher order geometric objects from vectors through an operator called the Wedge Product). Evaluating these requires the ability to call on this pseudo-tensor.

So, what is it, and what does it do? The Levi-Civita pseudo-tensor takes a certain group of indices and returns +1 if these are arranged in ascending order, or an order that can be composed as ascending with an even number of swaps. It returns -1, if the permutation is an odd number of swaps away from ascending order. It returns 0 in all cases where there is a repeated index. In general, the levi-civita symbol can be defined for any number of dimensions (number of indices given), and returns values for incomplete lists of indices (such as [3,4,5]) as if the elements not given in that list were prepended in ascending order e_3,4,5 = e_1,2,3,4,5 = 1

Here it is:

LeviCivita.m

Here is how to call it in Matlab:

>> LeviCivita([1,2,3])

ans =

1

>> LeviCivita([2,3,4])

ans =

1

>> LeviCivita([2,4,3,1])

ans =

1

>> LeviCivita([1,4,3,2])

ans =

-1

>> LeviCivita([1,4,3,2,18,91,128])

ans =

-1

Hope this helps anyone else out there who is exploring tensor calculus!

Book Review: Rolling Stones

Predating the magazine, and the rock band, Robert Heinlein wrote one of his “juvenile” novels, titled The Rolling Stones. I cannot recommend this book enough.

There is plenty of complexity in the “juvenile” novels by Heinlein to put most modern  authors writing for adults to shame. You won’t find very much serious contemplation of subjects like engineering simplicity, the role of the frontier in human society, the nature of legitimate and illegitimate authority, and the nature of adult responsibility even remotely touched on in most modern works.

The novel is an adventure novel set in space, but it has some interesting depth. One of the things I loved most about it was that the astronautical engineering and spaceflight science was done absolutely *right*. For a book that had it’s first version written in 1948, and the modern revision done in 1952, this is beyond impressive! You get the distinct impression that this science fiction author knew at least as much as most of the men deep in the space program.

This was before we could even put something into orbit, and Heinlein had already worked out the necessity of nuclear energy for reasonable mass fractions in interplanetary spaceflight. He managed to accurately portray the engineering and operational principles behind nuclear thermal rocketry (something that we wouldn’t attempt for real until 1952, the year the book came out.) His depiction of the nature of interplanetary navigation is also dead on accurate. I double-checked his numbers for transit times, frequencies, ect, for his interplanetary trajectories – he got it right.

Some of the things he didn’t get right, whether through artistic license, or lack of knowledge, were the nature of the other planets in the solar system. The mass and composition of Ceres is wrong (of course, we didn’t know anything about Ceres other than that it was there back then). Mars and Venus are depicted as in the other golden-age sci-fi of the era. Mars has Lowellian Martians, Venus is habitable. (Of course, we didn’t have any good data on the surface of Mars or Venus until the 60s. Back then, it was a reasonable guess that Venus could be an Earth-like planet – if not for the density and composition of its atmosphere, it would be – in many respects, it has the same bulk properties. One of the reasons why it is called “Earth’s evil twin”).

Nevertheless, all that is forgivable.

And that’s just the science. The story is also an engaging adventure tale of mankind spreading out into the solar system. (For now, I am out of time).

It can be fairly said that Gene Rodenberry stole most of his best ideas from Robert Heinlein. I have never read another author of fiction that was this engaging and evidenced this much love of my field of astronautical engineering.

Other books of Heinlein’s that are set in the same universe are:

Space Cadet

Farmer in the Sky

I would also recommend these books emphatically to anyone.

Heinlein is difficult to find. You can find *some* of his stuff in bookstores, and on amazon.com. To get electronic versions of his books (Kindle and other formats), you need to visit Baen.

Osama bin Laden Dead

http://www.foxnews.com/us/2011/05/01/usama-bin-laden-dead-say-sources/

Last night, news was released that Osama bin Laden was killed in Pakistan by a small team of our ground forces. This is excellent news.

I’m actually very surprised he had survived this long – after his dead silence (as opposed to his usual propaganda output) following the Tora Bora bombing operation, I had assumed he must have died sometime during the opening part of the Afghanistan campaign.

With any luck, this will begin to collapse Al Qaeda’s resistance in Afghanistan. I don’t know the precise value of that man to their organization, but with something like $100M in funding from his family’s construction business, and him being the planner behind a few of the more deadly attacks, losing that has got to hurt them pretty badly.

In any case, the leader behind killing hundreds of people around the world, and 3000 Americans in 2001, is finally dead.

Extrasolar Exploration

Speaking of boldly going where no-one has gone before, or at least taking a look: The Kepler mission has been discovering hundreds of new exoplanet candidates. By a count on 2 Feb 2011, it has discovered over 1200 planet candidates with apparent diameters ranging from less than earth to the usual Super-Jovians discovered by other methods. Among these candidates, several of them are terrestrial planets within the “habitability zones” of their parent stars, where liquid water could exist on the surface.

There are three main classes of detection of Extrasolar planets used to date. Past detection methods have been heavily biased towards detecting extremely massive Super-Jovian worlds, and this lead to (premature and baseless IMO – if all you have is a hammer …) speculation that terrestrial planets were rare in the universe. Kepler has shown that there is a vast abundance of smaller planets out there, and some rather extreme diversity in what can occur.

Kepler Data Analysts:

Small candidate planets with periods less than 30 days are much more common than large candidate planets with periods less than 30 days and that the ground-based discoveries are sampling the large-size tail of the size distribution. Note that for a substantial range of planet sizes, a 1/R2 curve fits the Kepler data well. Assuming the false positive rate and other biases discussed above are independent of planet size for planets larger than two Earth radii, this implies that the frequency of planets decreases with the area of the planet.

That should put that to rest.

The methods:

The first is to carefully null out the parent star’s light and look for reflected starlight off of the planets. This method favors gigantic planets far from their parent star, such as the Super-Jovians discovered in orbit around Formalhaut.

The second method is to observe the parent star’s position extremely carefully over a long period of time to look for gravitational wobbles induced by massive partners. This method of planetary detection favors massive planets in close orbits around their star.

The third method, the one that Kepler uses, detects planets by carefully observing fluctuations in the received starlight as a planet transitions across the stellar disc. For this method to work, Kepler’s line of sight has to be aligned parallel to the planetary disc of the target star system. This excludes roughly 1 in x star systems that Kepler is pointed at, assuming random orientation of the discs.

Kepler continuously monitors the brightness of 145,000 stars within its field of view.

So far, among the 1200 candidates detected by Kepler in the February data release, 54 candidates are within the habitable zone of the target star. Among those, five are close to Earth-sized and are believed to be terrestrial planets. Kepler has only been taking data for four months so far, and can only confirm planets with orbital periods within this timeframe. As it takes more data, it will be able to detect planets further and further out (within the habitable zones of hotter stars).

There have been several confirmed detections of multi-planet solar systems so far, including the star Kepler 11, which has 6 planets with some rather unusual properties. Not only has Kepler used the star to measure the presence of the planets, but it has deduced the density and mass of the planets, and confirmed that they are planets using their mutual gravitational influence on each other and the subtle effects that they have on each other’s orbits. This system is quite bizarre and is really like nothing in our solar system. These planets have very low apparent densities, from 3.1 g/cc (slightly less dense than the moon – maybe a light element planet or volatile world?) to around 0.5 g/cc (less dense than Saturn). Those latter planets would be gas giants, but would have to be very close to evaporation, being as close to the star as they are and within the size range of Neptune. In addition, these planets are all so close to each other and crammed so close to the star that the system is very nearly unstable.

http://www.universetoday.com/83030/kepler-discovers-6-planet-exo-solar-system/

http://arstechnica.com/science/news/2011/02/keplers-latest-a-tightly-packed-six-planet-system.ars

http://www.skyandtelescope.com/news/home/115102594.html

http://kepler.nasa.gov/

http://planetquest.jpl.nasa.gov/missions/keplerMission.cfm

The Kepler mission has revealed an amazing wealth of information about the extra-solar universe. To think that this sort of exploration is taking place in our lifetimes, and that with achievable technology we may come to know quite a bit about these planets and answer fundamental questions about life in the universe, and the relative abundance of other terrestrial worlds is mind-boggling. We won’t have to guess for very much longer. With this and future Extrasolar discovery missions, we will soon know vastly more than we have about what other planets are out there.

**Note – this chart is for planetary *candidates*. NASA doesn’t consider these planets confirmed until their presence has been verified by another instrument or method. The ones that have been are listed on the NASA website.

This New Age of Power and Wonder

Back in the mid 1800’s through the 1960’s, especially during the turn of the century, during the Belle Époque in continental Europe, the Victorian era in the British colonies, and the so-called “Gilded Age” in the United States, people believed in the future. This was more than just believing that the trend of one day following another would continue as time advanced. Back then, a large portion of society was aware of and believed in progress – the idea that with education, effort, and discipline, technology and society could be improved and that the future would be better.

This was a rather radical idea. Most societies throughout the history of the world were Romantic and backwards looking. They believed in lost golden ages or paradise in the distant past, and could only look with loathing and fear towards a degenerate future. In the tradition of the Romantic authors, mankind’s attempts to harness nature and improve his condition were sacrilege and blasphemy, and could only end in horror.

I am reluctant to call the former attitude Progressive to avoid conflating it with the modern political ideology that crudely attempts to own the future through its naming convention. (By and large, the Progressives aren’t Progressive in this sense at all: the Green subset of the movement fears and opposes a technological and abundant future. In the past, before the 70’s era neo-Malthusianism, there seemed to be a group of truly progressive leftists, and their loss is a loss for the movement IMO.) For the scope of the article, I’ll adopt the naming convention of Futurist – Romanticist axis.

These attitudes have been with mankind in varying degrees among people with varying temperaments since at least the ancient Greeks, probably since the dawn of speech. The classical Greeks, being scarily intelligent people (at least the ones who took the time to write), were probably some of the first to seriously toy with the Futurist attitude. (Actually, now that I think about it, I don’t recall many other ancient cultures generating legends where their heroes defeat their foes through cunning (metis) and technology, rather than brute strength and divine magic. Who else would have Archimedes and his mirrors burning the enemy fleets of Rome against Syracuse?)

But aside from the few comparative “bright spots” in ancient human history, the Romantic mode was the dominant mode of human thought. That began to change in the 1500s, until by the mid 1800s it was a dominant social force. In some respects, the characteristics of the era drove the Futurist mode of thinking to the forefront.  If you were a peasant in one of the Prussian kingdoms in the mid 1800’s you could, within a single lifetime, witness the transformation of your world from one of primeval forests and cruel feudal principalities to one where industrial city states and walled merchant cities forced back the boundaries of untamed nature, where vibrant universities worked through all the mysteries of classical physics, and where innovation gave rise to factories, clocks, trains, electrification, flight, and the fumbling beginnings of scientific medicine. In America and the European colonies, the more familiar situation was the same: Edison, Westinghouse and Marconi tamed electricity and put it in the service of mankind. Mass production brought what was once fabulous wealth (not just cars, but *gasp* metal silverware and tools, large amounts of clothes, food and toiletries and cleaning supplies, pianos and sewing machines – this list of radical improvements is endless) into the reach of the average man. Horrifying plagues that previous civilizations cowered before were eradicated. These people were literally living in “the world of tomorrow” (at least until, in continental Europe, WWI tore that world apart). The literature of this era was the Jules Verne scientific romance (in continental Europe), and the Edisonade (in America).

There is a sort of retro-futurist fantasy literary movement called “steam-punk” (Think Wild-Wild-West) these days which attempts to embellish this era by giving them more technology and making it more ubiquitous than it actually was, but the truth is, it doesn’t take all that much embellishment to capture the heady nature of the era.

Below are some artifacts from that time – some cards from the back of cigarette cartons, portraying the advances that they looked forward to achieving in “This Era of Power and Wonder” – many of which, today, we would regard as mundane aspects of our day-to-day lives.

Enough about the past, what about the present?

I write this because I have noticed a rather disturbing trend in modern civilization: we seem to be losing the Futurist mode of thought. It was a noticeable cultural force through the 1960’s, but after that it seems to have sharply declined.

In terms of actual physical innovation, the “age of power and wonder” hasn’t ever stopped. This decade, like the many before it, has seen radical advances in science and technology, and brought improvements to our day-to-day lives. But people, for the most part, don’t believe in the future anymore. The optimism, of the Edisonade, the 50’s era adventure novel, the 60’s era Star-Trekkian space exploration novel, is gone.

Your mileage may vary, but I blame several movements for the loss of confidence, among them the postmodern movement which seeks to criticize and tear down the values and aspirations of society, and the neo-Malthusian green movement, which saw the continuing progress of technology and the ever increasing general prosperity that it created as the greatest threat to their desired future of an untouched, unspoiled planet.

Today, whenever an artifact of that prior period of confidence and optimism in technology is presented, it carefully arranged as a darkly ironic stab at the supposed sins of the era, never to be presented straight, as an honest statement of the hopes and dreams of the people of the time. When was the last time you saw one of those 50’s era futurist posters, such as for atomic energy (which, as far as I can tell, is still the best hope for meeting the energy needs of the earth) presented except as part of a dire warning against an “impossible” and naïve vision that can only end in horror?

Today, science fiction, necessarily the literature of the future, of what we hope to accomplish and build someday, is rudely classed with fantasy in our bookstores. Science fiction is regarded as trashy literature, and people who read it must be trashy social rejects and hopeless geeks. There is a malicious literary movement (called “mundane-science-fiction”, I believe) that ridicules any attempt by authors to portray a future with “unrealistic” hopes and dreams, such as mankind moving out into space, or the material needs of the earth being provided for, or for that matter, any world-changing advance at all. To these people, the only possible future is one that is the same or worse than the present. To them, we stand at the apex of science and understanding – there is nothing new to be discovered, there is nothing world-changing to be invented, just newer and shinier toys that are just like the ones we already have. (And, rather than being a sign of abundance and the climb away from poverty, are regarded as a trashy, empty thing to aspire to anyway.)

This is poisonous. Fortunately for the world, it is also bullshit.

The Future: This New Age of Power and Wonder:

At this very moment, you are sitting in front of more computational power than the entire country had in 1970 when NASA landed men on the moon. You could, if you know how and are a good programmer, use this computing power to simulate *anything*, to work out the numerical consequences of the most radically complicated math, and to bring miniature universes to life. You could iteratively seek optimized solutions to any problem you are capable of posing in sufficient detail. You are using it to read documents authored halfway across the world for an arbitrarily low cost. You could fit all the books written in human history on a device that can fit in your hand, and said device would cost a fraction of your monthly income. (Yay computers, enough about computers – this is one area that is at least acknowledged).

At this very moment, in AI labs around the world, people are experimenting with structures capable of learning and adapting to their surroundings. Scientists are embarking on the complete “uploading” of the brain of a fruit fly, and the working of it in software. We are on the verge of having our hands on the very stuff that minds are made of!

http://nextbigfuture.com/2010/04/cell-by-cell-map-of-fruit-fly-brain.html

At this very moment, our space telescopes are discovering thousands of new planets orbiting other stars. The Kepler spacecraft is even discovering terrestrial worlds in habitable zones of their stars: potentially earthlike worlds.

http://arstechnica.com/science/news/2011/02/nasas-kepler-status-report-1235-exoplanet-candidates.ars

Space probes from around the world are seeking out and drilling into the surface of asteroids, and penetrating the atmospheres of unexplored moons across the solar system.

http://en.wikipedia.org/wiki/Huygens_%28spacecraft%29

http://b612.jspec.jaxa.jp/mission/e/hayabusa2_sequence_e.html

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

At this very moment, teams of manufacturers are competing to produce machines that can reliably and efficiently print out parts completely specified in software, as easily as you can print a document today.

http://en.wikipedia.org/wiki/3D_printing

At this very moment, private companies have taken up the banner of space-flight and are launching things into orbit. http://www.spacex.com/

Biologists are mapping the genome and how it translates into the operation of cells and organisms. Not only can we take genetic material apart, now scientists are capable of writing it out from a software recipe and getting it to “run” again. While biology remains extraordinarily mind-bendingly complicated, we are beginning to use our vast computational resources to reverse-engineer the machinery of life. We are beginning to use life to mass produce structures small enough to fit inside a cell – capsules to selectively deliver anti-cancer medication in one example. With the very stuff of life firmly in our control, who knows what we could accomplish –The improvement of memory and intelligence? The replacement of organs? The ending of disease, possibly of aging and death from old age itself?!

None of this is science fiction. These wonders are *real*. This stuff is going on in government and industry labs all over the world, and in some cases in people’s garages, in airport hangars, in machine shops.

The continuing adventure of the modern age deserves that old optimism, if all it gets is cynicism. If all you had to go on was our popular culture today, you would think the future was a bleak and hopeless thing, best avoided – and that would be a terrible disservice to your outlook. Other than people with a futurist attitude writing and disseminating art and literature that express a proper attitude towards the challenges and opportunities of the future, I don’t see quite how to solve the problem of the degeneration of modern art. Perhaps it is a temperament thing – perhaps the people who would naturally produce these works are too busy creating the future to write about it and depict it, and so we are left with the dour, cynical Romantics to produce our art and literature. Perhaps part of the solution is to push back against the social stigma against futurist literature, and to insist that science fiction is indeed a literature of profound and important ideas. And besides, even though geeks may not be at the apex of the high-school/primordial social pecking order, realistically who else is going to be out on the frontiers of human knowledge and experience, blazing the trail, going boldly where no one has gone before? What could be cooler than that?

To turn your back on the future, to write off the promises of science and technology in this era of all the eras in human history, is to miss one of the most profound intellectual adventures that mankind has ever embarked upon!

Inconsistency in Blogging

I really really need to post more consistently. So far I have been about as constant blogging as I have been keeping my journal.

I suppose part of it is trying to have something definite and complete to say/present. I’ve been working on understanding a lot of diverse things recently – field equations, arbitrary differential operators, differential forms, and tensor calculus on arbitrary manifolds. However, I am still working through (and flailing around blindly in some cases) on the beginning stages of understanding the subject. I imagined I would have something to post by now – perhaps I should try posting something even if it is incomplete.

There is a type of learning strategy called the “rubber duck” lecture. Apparently there was a programmer who would debug his programs and understand the code he was trying to produce by lecturing a rubber duck on his desk about the meaning of each particular line. Apparently it was a very successful strategy for him. I’ll have to try it sometime.

Random trivia: Here’s a cute phrase I found somewhere online:

Conserve energy. Commute with the Hamiltonian.

But, I’ll have to do it tomorrow. Tonight, I have a splitting headache. Blech.

I can has manifold calculus

No. I’m not crazy. Not quite yet. Hehehehe.

I’ve been trying to work with manifold calculus over the past few days, working up to a general understanding of partial differential equations in arbitrary coordinate systems. Differential operators can end up doing some freaky things if your coordinate system isn’t orthonormal.

I’ve also been going through Grassman/Clifford algebra and it’s relation to strictly anti-symmetric tensors. I think I’ve got that roughly down, but the algorithm for evaluating their measure, while it looks pretty elegant in it’s compact form, is not at all nice to compute, or simplify.

Hopefully, once I can get this all down to the point where I can understand it, certain other aspects of things like reletavistic electrodynamics will become clearer.

Still, slow going.

Victory is mine!!! !! !

Finally! I managed to figure out what I was doing wrong. When I calculated the orbital positions on the plane, I was measuring both the perigree axis and the true anomaly from the same reference axis (called k1, 90 degrees from the axis of the ascending node). This was incorrect – in the 3d case I was measuring the true anomaly from the perigree axis, as I was supposed to. Just one tiny change, and now everything works!


Edge cases are evil!

So, I’m in the middle of putting together a bunch of code under a project called “Project Navigator”. Navigator is supposed to help me perform astrodynamics calculations.

While the math involved has been easy, the programming has been a nightmare. Why? Edge cases. I don’t know how many times I thought I was almost done, only to have some obscure numerical condition come up to bite me. If there are hyperbolic transfers, I need code to handle all the period counters to make sure I don’t wander off to infinity in a finite time. I also need to be able to integrate clockwise and counterclockwise around the conic section without bridging any critical angles.

My prior attempt at solving for transfer orbits attempted to avoid all this minutia by running a generalized solver to fit one conic section to bridge the departure and arrival points of the other two. Unfortunately, there are all sorts of perverse local minima lurking in configuration space which my solver delighted in bombing out on. It was also waaay to slow.

Okay, so I did some math and worked through everything on the plane with only one variable. I finally managed to beat all those problems into submission. Only I didn’t. When I tried to map the projected orbit back into three dimensions, I discovered that there was something screwed up about the projection – now there *are* no angles I can pick to match the transfer plane to the departure and arrival points, and I have no idea why, because I quadruple checked my rotation matrices and angle math.

I attempted a C3 plot of the delta-v for departure to Mars. See that blob? It’s supposed to be relatively contiguous, with two minima. Instead it is cut up, folded over, and scattered all over the plot.

Gaah!

I spent an entire week trying to *fix* all the bugs. At this point I’m not learning anything new, I’m just bogging down trying to find out why the code is blowing up.

The most galling thing is that none of this *should* be difficult. It shouldn’t require 4000 lines of code, it shouldn’t need 15 levels of nested if statements to handle everything that goes wrong. I can solve these cases by hand faster than I can via computer!

I’ll take a break, but won’t give up on the project entirely. I seem to have made a few key corrections. It looks (jinx) like I am approaching the end of the fatal bugs.

New Neutrino Telescope

Apparently one of the newer NSF science projects is a 1.5 mile long neutrino detector, called Ice-Cube. In the antarctic, they will drill 86 holes, 2820m deep down to bedrock, and lower strings of detectors down the length of the hole.

Neutrinos are particles produced in fusion reactions. Neutrinos and antineutrinos are the chargeless analogs of electrons and positrons, and only interact with other matter via the weak nuclear force. Because the weak nuclear force is very weak, it is very improbable for neutrinos to interact with anything.

It is so rare that they interact that the Earth is largely transparent to their passage. Prior neutrino detecting experiments were built deep beneath the earth to block out all other forms of radiation. These detectors built up an image of the mantle of the sun: at midnight, on the other side of the world.

 I imagine that the NSF is interested in this telescope to probe deep into the heart of energetic phenomena like quasars. The gas, dust, and accretion disks would be transparent to neutrino passage, and you would see straight to the heart of fusion processes.

I wonder though if this is a telescope in the sense of being able to build up a focused image from the data, or if it can only build up a defocused accumulation of neutrino magnitude as a function of direction? After all, if a neutrino interacts with the top detector, it would be very amazing odds for it to interact with any of the others prior to flying out into space, even without taking into account the scattering nature of the detection.

Still cool regardless. We live in amazing times.

Source Article: http://www.networkworld.com/community/blog/massive-ice-bound-telescope-set-capture-elusi

PS:

Future professor: You failed your quals! To encourage a proper studious attitude for the retake, I banish you to the ice telescopes of Antarctica!

Future grad student: Nooooo!