Monday, August 24, 2009

The Beatles: Rock Band. This is going to be BIG!

First, take a look at these videos to see for yourself (If these have ads just click the handy mute button and wait 10 seconds).

http://www.gamespot.com/xbox360/puzzle/beatlesharmonixproject/video/6213674/the-beatles-rock-band-more-songs-official-trailer

http://www.gamespot.com/xbox360/puzzle/beatlesharmonixproject/video/6213669/the-beatles-rock-band-preview-vocal-trainer

http://www.gamespot.com/xbox360/puzzle/beatlesharmonixproject/video/6215294/the-beatles-rock-band-video-preview-beatles-beats--more

This “game” looks extremely well crafted. All the backgrounds are relevant to what the band was doing at the time whether its gigging in the Cavern, on a world tour at Shea Stadium, conquering the U.S.A. on the Ed Sullivan show, just hanging out being psychedelic in India, or in London doing the rooftop session.

People are going to get totally into this, and money is to be made for those that realize it in the secondary market like hosting competitions, and ideas unforeseen but certain. For example retailers are offering guitar controllers that are reproductions of the classic Beatles instruments like Paul's Hoffner bass and John's Rickenbacher six-string.

My GameStop clerk informs me there will be many more donwloadable Beatles songs but no sequel release to The Beatles: Rock Band is planned.

The vocal trainer looks poised to teach harmony singing to the masses, which was one of The Beatles greatest strengths especially in the early years.

And if the drum trainer makes drummers play more like Ringo the world of Rock would be a better place. Paul says the band gelled after Ringo joined but I can't find the reference in my Abbey Road session notes book. Its odd I know, but his drumming always sounded melodic to me. In one review, the GameSpot commentator claims Ringo is no Neil Peart (drummer for the Toronto band “Rush”), but according to the link below, Ringo's ranking at 26 compared to Peart at 22 is not that far behind.

http://www.stylusmagazine.com/articles/weekly_article/stylus-magazines-50-greatest-rock-drummers.htm

Notes:

I counted seven George Harrison tunes in the 45 song set including the almost entirely unknown “If I Needed Someone”. This is a very slight over-representation as George wrote close to one out of every eight Beatles songs according to "BEATLESONGS" by William J. Dowlding.

We get one Ringo song in the list, Octopus's Garden, which of course way over-represents him since there are only two Beatles songs Ringo gets complete authorship credit for (the other one is Don't Pass Me By). He also gets one-quarter authorship credit for Flying.

Stylus lists one of Ringo’s best drumming credits as “Ticket To Ride” but it was Paul McCartney who told Ringo how to play the drums that time around.



Friday, August 14, 2009

Order of Matrix Multiplication for 3D Transformations – Two Interpretations

In 3D graphics applications such as video games, a 4x4 matrix of real numbers is used to perform transformations on objects. A transformation can be any or all of: a scale operation (re-size), a rotation, or a translation (change of position). Any of these transformations can occur along any or all axis and can all be represented amazingly, in a single 4x4 matrix. When applying these transformations, multiple matrices can combine their transformations into one matrix using matrix multiplication. The order of matrix multiplication is important and when visualizing the results, there are two distinct ways to interpret this.

In Microsoft’s XNA Framework which supports the creation of games for Windows and the XBOX 360, the 4x4 matrix is used for 3D transformations. Before we can intelligently use the matrix, we need to know how the 3D directions are aligned to each other. 3D space in XNA is right handed which means if the fingers of your open right hand are pointing in the +X direction and if your palm faces the +Y direction then by definition your thumb points in the +Z direction. The convention used in the game industry is: +Y is up; and in engineering: +Z is up. For now, let’s use the more familiar terms Right, Forward, and Up which also form a right handed system.

What does it mean to rotate around an axis? When rotating an object around say Up, if you point your right thumb Up, then the object will rotate the way your four fingers curl as you make a fist. The Earth rotates around the north pole this same way.

Suppose we create one matrix to rotate 90 degrees around Up, called M1, and a second matrix to rotate 90 degrees around Right called M2. If we want to apply both of these rotations to our 3D model we might multiply M1 * M2, or we could multiply M2 * M1 which would not produce the same result. To visualize the results of M1 * M2, we can say M1 is applied first, then M2, and M2 operates within our original axes alignment. This is left to right associativity. Or, we could say M2 is applied first, then M1 but we have to reconfigure our axes such that after M2 is applied, they appear unchanged from the model’s perspective. Then M1 operates within this re-aligned coordinate system that resulted from M2 . This is right to left associativity. Either way we get the same final result, and this is true regardless of whether M1 and M2 are rotations, scale, or translations, or any combination thereof.

Lets look at an example using only rotation around two axes and illustrating left to right matrix associativity. Figure 1 shows on the left our 3D space with axes located at the origin: green is Up, black is Right, and white is Forward.
Figure 1: 3D axes and 3D model
Figure 1 shows on the right our lovely 3D model consisting of a cube, sphere, and cone all attached together and centered at the origin.

Figure 2 shows on the left the results of applying just M1 – rotate 90 degrees around Up, and on the right shows M1 * M2 – rotate around Up then Forward. The cone is down and the ball is to the right.

Figure 2: Rotation around Up then Forward

Figure 3 illustrates the order of matrix multiplication is important: On the left is just M2 -rotation around Forward, and on the right shows M2 * M1 which is rotate Forward then Up,

Figure 3: Rotation around Forward then Up
- obviously not the same result as in Figure 2 (Up then Forward). The Right, Forward and Up axes did not rotate in any of these first three Figures because we are using left to right matrix associativity.

Now lets look at M1 * M2 using right to left matrix associativity. Here we describe M1 * M2 as M1 “after” M2 and now we must apply each matrix to the axes as well as the model.

Figure 4: Rotate Up After Forward

Figure 4 shows on the left just M2 applied this way. Notice the axes have been rotated so that from the perspective of the model they are unchanged. Figure 4 on the right shows M1 * M2 “M1 after M2” where M1 is rotated around Up, but Up is the transformed green axes. You can see it is the same result for the model as Figure 2 M1 * M2: The cone is down and the ball is to the right.

Let’s now consider instead of rotations, the other two transformations: scale and translation. Suppose we create a matrix M3 that translates forward, and another M4 that scales by half. Figure 5 shows on the left the result of M3: a translation forward and on the right is shown M3 * M4: translation then scale by half.

Figure 5: Translate Then Scale

When performing a scale operation, the distance from the origin to the model is scaled, so the model ends up closer to the origin by half. The axes were unchanged because we are using left to right matrix associativity. Using right to left matrix associativity we would call M3 * M4 “M3 after M4” and apply all transformations to the axes. Figure 6 shows on the left the scale by half which is M4, then on the right the translation forward is applied but since the axes have also shrunk, the model is moved forward only by half.

Figure 6: Translate After Scale

The end results for either associativity are the same although the intermediate steps are indeed different. The model never really experiences the intermediate step though, so the path it actually takes assumes a mystique somewhat reminiscent of certain quantum mechanics principles like perhaps wave particle duality.

When visualizing 3D transformations, I prefer to use left to right associativity for two reasons. First it seems more natural to me to apply the matrix operations left to right since that is the direction we read text, and second, I don’t need to keep a separate set of axes in my head. Either one works if applied correctly.

-----------------------------------------------

1: XNA 2.0 Game Programming Receipes by Riemer Grootjans

Monday, August 10, 2009

The Zero Stoplight Paradigm

Stoplights are ubiquitous in our cities. They do their namesake: they stop traffic. Almost all busy city intersections of two perpendicular roads are controlled by stoplights. Left turns are quite costly in terms of accidents and delay. Left turn cycles must by their nature shorten the time allotted for straight through traffic which backs up more traffic in all directions which increases the need for the left turn cycle and so on. But the most time is spent stopped waiting for traffic on the intersecting road. Overpasses solve the problem nicely but are very costly. Although stoplights slow us down, causing us to waste fuel while backing up traffic into jams and snarls we put up with them because there is simply no cheap alternative. Or is there?

The obvious alternative to stoplights is the roundabout. Roundabouts connect two intersecting roads each supporting two-way traffic with a small counterclockwise one-way loop. Large roundabouts are common in European cities where drivers are familiar with them but they can be controversial in the USA where they are typically much smaller. A roundabout replaces an intersection by requiring traffic to slow down, then to get into the roundabout, yield and merge once then yield and merge again to get to out of the roundabout. These two yield and merges must occur in rather quick succession which can be tricky although the driver has the option once inside the roundabout to continue going round and round before exiting. People dislike them for these reasons and we know there are no more improvements that can possibly be made to the design of the roundabout because we haven’t seen any, or are there?

Usually only grass and trees live in the center of the roundabout. Using your imagination for just fifteen seconds right now, suppose the roundabout is greatly enlarged. And suppose instead of only trees and grass in the center, it contains a neighborhood or a section of a city. And now instead of calling it a roundabout, let’s call it a roundall. And suppose instead of four intersecting two-way roads along its outside perimeter, there are many. And imagine as you drive counterclockwise (CCW) around the roundall you occasionally see a one-way lane exit the roundall into the interior and occasionally you see a one-way lane joining the roundall from the interior. Now suppose this basic roundall topology occurs on a smaller scale within the roundall’s interior and again on a larger scale outside the roundall.

Since the roundall is much larger than the roundabout, and quite like a one-way version of a modern freeway, the roundabout problems of unfamiliarity and rapid yield-merges are both eliminated.

Using your further imagination, please envision a new type of roundall where the direction of travel is clockwise! Traffic on two-way roads outside the clockwise (CW) roundall would need to turn left to enter or exit the CW roundall. In order to avoid creating an intersection the two-way road would be split apart and rejoin itself in a loop that doubles as a merge-lane and an exit lane. All this is much like if not exactly like existing pavement already in place within our modern freeway system.

Now comes a key advance the roundall design can provide: Clockwise and counterclockwise roundalls can be directly connected to each other alternately such that two-way roads and stoplights would be together eradicated! A driver following roundalls that alternated CC and CCW would etch out one big S-shaped pattern after another. If the geography of a city dictated, the S-shape could be made taller or wider as needed by the local traffic patterns. For example my city is predominantly laid out north-south and so a taller S-shape would be suitable.

What you have just imagined is an area with smoothly flowing non-stop travel and a completely stoplight-free zone! But in order to get to someplace very nearby, it might be necessary to follow the loop and go out of your way a considerable distance. But so what if you have to travel a bit further if the time and fuel is the same or less? If you are navigating to a never-before visited location using visual reconnaissance, you would be in for some surprises and frustrations. All the more reason to upgrade your vehicle to include a modern GPS navigation systems like those in newer automobiles today.

Academic studies should begin investigating such properties of the roundall as average speeds , time to destination, accident rate, and number of lanes needed. A thorough computer Monte Carlo simulation should be performed comparing these factors for existing road designs against the roundall design. I bet 100$ that the roundall achieves higher speeds with comparable trip times and less pavement. Then the opportunity will exist for forward thinking city planners to adapt existing areas to the roundall or apply the roundall to new areas such that intersections are bygone, stoplights are bygone, fuel efficiency is increased, and even stopping is a rare thing until you reach your destination. And I can think of no better road design than one that completely eliminates intersections to turn over the navigation of our automobiles to a computer allowing drivers to relax while en route and finally be able to safely use those cell phones on the road.



Figure 1:

Roundall pattern with two possible routes in red and green:

Friday, July 24, 2009

The Lightning Capacitor

If you know me you know I admire Nikola Tesla as the world's greatest engineer on a par with or perhaps even surpassing DaVinci. Although Tesla pioneered numerous electromagnetic related fields he did not abandon the seemingly less sophisticated area of electrostatics. An example of this that I will draw on is his Death-Ray, which he proposed to build to defeat Nazi Germany during WWII and which used electrostatics to propel it's projectiles. (I plan to discuss Richard Fenyman's important and almost incredible comments on the awesome power of electrostatics in relation to the moon and the A-bomb in a future posting.)

Huge successes in the field of electrical engineering with electrodynamics, i.e. radio, cell phones, radar, integrated circuits, are ongoing, but has that resulted in science and industry overlooking the important area of electrostatics? In the sky-is-the-limit spirit of Tesla, hopefully, I would like to propose a new use of an electrostatic device for capturing the energy of lightning - the humble capacitor. My idea to capture lightning is surely not original but what is perhaps novel is the application of Tesla's Death-Ray design to lightning capture.

Lightning occurs when the voltage between a cloud and the earth (or another cloud) exceeds the breakdown limit of air which normally acts as an insulator. Flourescent lights, invented by Tesla, (even though General Electric on their website claims to have invented them in the 1940s), use this effect. When the voltage per foot exceeds the breakdown limit the electrons in air molecules break away and become conductive in a cascading manner. Huge currents result. One way to capture this energy would be to inductively couple the current into a superconducting coil via a huge transformer. However, this is not currently feasible (pun not intended) because superconductivity breaks down as the density of current rises in the superconductor and disappears well before the level of current needed for lightning capture is achieved.

Alternatively, the electric charge from lightning could be captured and made to come to rest before reaching the ground, possibly. The "Lightning Capacitor" would require two parallel circular plates, large enough to disperse the charge and allow it to spread out, being perhaps an acre in size. It should have a lightning rod attached to the top plate in the center. Techniques for inducing atmpspheric conductance to encourage lightning to strike could be employed directly above the plate such as shining UV light upwards, as was done by Tesla at Wardencliffe on his Magnifying Transmitter.

The bottom plate should connect to a large number of copper "roots" spreading out underground in all directions and embedded in wet, conductive, earth to allow the vast inrush of opposite charge to the bottom plate, thus instantly capturing and confining the electric field.

The sides of the capacitor present an engineering challenge because they need to provide physical support for the top plate without providing a conductive path.

The most important consideration is preventing the lightning from simply charging the top plate up to an enormous potential then creating another discharge to the ground - in effect bouncing off or punching through the capacitor. To prevent punch through, the capacitor should contain nothing between the plates, in effect a vacuum. Any air molecules would instantly ionize and conduct. Most common dielectric materials would surely(?) breakdown as does air at these tremendous lightning voltages. To prevent the lightning from bouncing, it would be desireable to extend the vacuum around all sides of the top plate for many meters. The design crux is how to support the top plate physically without creating a discharge path.

This is where Tesla's Death Ray may hold a clue: Tesla used the Bernouli effect of a vacuum created by moving air to support large electrostatic potentials. So following his design would suggest making each of the top plate and the bottom plate into two parallel plates and pumping air between them from their centers horizontally outward at such speeds that a sufficient vacuum can be achieved. The airflow required would be much greater than Tesla needed since only the Death-Ray gun nozzle needed to be surrounded in vacuum. With the lightning capacitor, the entire circumference of a one acre disk needs to be vacuum sealed!

Another shape for the Lightning Capacitor could be a sphere. The sphere would consist mostly of an insulating dielectric able to withstand extremely high potentials. At the top and bottom of the sphere would be the two plates to hold the charge. The plates would have to be small in relation to the size of the sphere so that the huge electrostatic field would exist mostly between the plates and as the sphere walls close in on each other away from the plates so too does the electrostatic field intensity drop. A vacuum would still be required inside the entire sphere. If the plates were an acre is size, the sphere might have a radius of about one mile - a bit beyond reach of todays engineering and surely unfundable.

An alternative approach is to capture the electrostatic potential of a cloud before the lightning occurs, and at the same time obtain water and the potential energy of the water in the cloud, which I plan to discuss in a future post on "Cloud Harvesting".