Sponsoring Links from AdSense:

Sunday, July 5, 2009

Tennis Practice - On Court with a Wiimote






Its summertime and these last few weeks have been full of exciting tennis and with todays marathon final between Roddick and Federer who claimed his record 15th grand slam title in a gruelling 5 set match its hard not to get excited.

I used to play a lot in college but recently I have'nt been able to hit the courts much until the last few weeks. Well lots of things in my game need repair including my serve and especially, can you believe it the toss!

Well the internet is a great place to find tips and tricks so I started watching some videos online and they cheerfully say something like this about the toss:

"A high, confident toss made 1 to 2 ft. inside the baseline allows the server to uncoil both upward and forward into the court, making contact at 1.5 times body height" (see Popular Mechanics on the Andy Roddick´s serve.)

Sounds good but when I am out on the court my toss is going all over the place. So I hit on a brilliant solution. If I could physically messure my toss exactly I could see how much acceleration I am using in my arm and then I could just practice with computer feedback.

After all the whole thing of collaborative computer feedback and measuring your activites for self imporvement and awareness to improve is a growing field see for example groundbreaking work by Gary Wolf and Kevin Kelly over at http://www.quantifiedself.com/.

Well I was thinking...the wiimote has accelerometers.

Well that sounded like a plan so I poped open my wiimote soldered in a few wires to the minus key and then taped the wiimote to left arm (I am right handed).

Then I taped the other end of the wires to my thumb and wrapped a tennis ball in aluminum. So now when I had the ball in my hand it completed the circuit and pressed the button which registers the data in the software. I then toss the ball and when it leaves my hand it unpresses the button stopping the registry of the data from the accelerometer.

I wrote the data to a textfile and then ploted it all out. By subtracting for the earths gravity (remember thats 9.8 meters/second squared) you get teh resulting acceleration.

Then by integrating this resulting acceleration I found the height of my toss using that old trusted formula of setting kinetic energy and potential energy equal at the top of the toss. Here is the data I captured from one of my tosses:


I have put the data here if you would like to integrated the equations of motion for your self. My calculations showed a toss speed of 3,94 meters/second when the ball left my hand and a height of 0,8 meters.

In the end everything works great. I can take my laptop to the court attach the wiimote to my wrist and correlate my tosses to the success of my serves.

So if you are a real nerd or a high school physics teacher and you want to try this you will need:


This same technique can of course be used for any repetitive activity that you want to repeat exactly every time for consistency. Think golf, bowling, etc.

But just remember it is hard to look any more nerdy than having a wiimote strapped to your wrist, but then again, hey - "Who Cares what other people think".

Good Luck and Have fun this Summer!!



Wednesday, May 20, 2009

The Long Journey to Mixed Reality, Photosynth with the Wiimote (Wii Remote)




The year was 1995.  Ace of Base was in the top 10 and Sweden was the place to be.  I was just finish my graduate studies in Plasma Physics and my cousin and I were working on a secret project.  I was working as a consultant with VR and my cousin was working at a large Swedish company specializing in radio and telephones.  

MIT Media Lab was all the rage with the wearable computing initiative which was one of the first groups to widely publicize the use of solid state accelerometers.  Or plan was simple: to build an inertial tracker based on solid state accelerometers and filter the output to reduce the error and use this device information combined with GPS  to make what is now called a Mixed Reality game.

All this when we were not busy having too much fun in the fantastic Stockholm nightlife.

Fast forward billions of dollars of investment and 12 years....

I now have in my hand the final product.  Its done!!

The good news is that the billions of dollars weren't mine and that the device which costs $39 has bluetooth to integrate to any computer.  

That's right it is the Wii Remote and you don't need the game console you can just buy the remote separately.

The bad news is I don't have time to play games (never mind th Stockholm nightlife) anymore since I am busy most of the time working on project schedules or PowerPoint's.

Mixed Reality is a reality and almost every new computer, PDA, digital camera or mobile phone now sports at least an accelerometer.

To get convinced that the Wii Remote is an incredible thing watch this TED video.

And for the real hackers out there check out Johnny Chung Lee's wii page where he tells you how to do various wild and crazy things with the Wii Remote.  The software for download (evidently more than 500,000 people have thought this was the cool thing to do) is there and it allows you to read the accelerometer values directly.

Want to work on your Tennis or golf swing?  Connect the Wii to racket or golf club!

But what am going to do with my Wii Remote right now?

Use it to demo my favorite application: Photosynth and pretend I am in the movie Minority Report. 

Johnny Chung Lee says that the arms get tired after waving them around for a while.  A small price to pay for a dream come true.

Monday, April 13, 2009

Computer Vision Gurus and a Cool Technique to Use PhotoSynth as a 3D Scanner of Any Object



(3D scan of a Sculpture by René Shapshak created using PhotoSynth)

Update April 17th 2009: One of the guys, Javier Ruiz,  from the GeoConcepts Group just pointed out that Vexcel (a Microsoft Company) is marketing a product called GeoSynth that seems to be highly relevant to this type of work.  According to their webpage:  GeoSynth™, a derivative product of Photosynth™, enables fully automated reconstruction of 3D scenes from digital photos and an intuitive means to visualize the photos within a 3D context.

Well after a few days of horrible weather this weekend the sun finally came out but as much as I wanted to get out, for reasons known only to some strange and alien creatures from another planet, I was stuck deep in review of the fantastic world of SIFT, affine transformations, Homogeneous coordinates and other such chin stroking stuff.  

It was as if Drs. Zhang and Lowe had jumped out of their personal web pages and where prodding at me to figure out how it could be possible to solve the insolvable.

I mean how could it be possible to take a few pictures and from those pictures make a 3D model.  No way I thought.  Impossible.  Maybe if you measure at least a few of the distances involve or tell the program what kind of lens and what kind of zoom you are using.

Zhang and Lowe just rolled their eyes and told me to keep trying.  And try I did.  

First thing you have to do, the ghost of Lowe told me, was to use computer vision algorithms to find the feature points with the SIFT method.  This method uses all sorts of fancy math like Gaussian, Gaussian pyramids and a whole bunch of other stuff to find features in the images.  These features are special, very special in that they don't change as you move away or rotate the image.  This makes them great points to look for if you are stitching together photos to make a panorama. 

OK so now we have these feature points but how do we know where they are in 3D space.  Well this is when the ghost of Dr. Zhang floated over and told me, "for that you need to find the intrinsic and extrinsic camera matrices." 

That did sound very cool so I decided to do just that.

But how to do it.  I remembered an episode of "24" where Cloe had used a library from Intel called CV to do something like this but the episode of CSI where they use Photosynth from Microsoft to do something similar seemed even better.

Cool I thought,  I won't have to program at all.  I'd just plug the photos into Photosynth and off I go.  

And off I went to install the Photosynth plugin in my exiled Explorer browser.  The rest must have been good for Ms. IE. though  because as she came up everything went fantastically smooth.  The plugin installed and I found my self mesmerized by the Pyramids of  -not Gauss- but of Giza.  Boy would I like to have a 3D model of that.  Wouldn't it be cool to have a digital copy millimeter by millimeter of the egyptian pyramids on my hard disk.  That's what I wanted.  For sure.  Cool!

So now I had a plan.  I was going to use Photosynth and my cameras to make a 3D digitizer of everything I could get my hands on or visit.  Would this possible?  I couldnt see why not, after all they where right there on my screen.  Just holding down the CRTL button in Photosynth makes those litten feature points appear like Christmas lights on 5 ave in December.

What to start with.  I looked around.  A little sculpture would do nicely.  I took some pictures from different angles and then created my Photosynth.  Its here if you want to see it.

And sure enough as I held the CTRL button down those magical feature points in 3D showed up.  So I just hit left click and then save --- what no save *?¿?.  This was a problem-my plans where shot.  Photosynth would not be my 3D digital scanner.  The guys at Photosynth said they would releasing an API etc etc.  but with the world economy crashing I thought it would be better sooner than later to get my 3D digital scan of the sculpture.

So a little digging got me to these guys who have written a script to parse the files that Photosynth uses and makes guess what...a file with the 3D points of my sculpture that I can store on my harddisk and they are even color coded!!

Mission accomplished!

Here is the recap for those of you are still trying to solve the Gaussian pyramid from the first part of the lecture ... woops I mean explanation ;-)

Step by Step approach to make a 3D digital scan of anything
  1. Install Photosynth
  2. Make a Synth
  3. Look at the page source of your synth when you look at it and find the synth file which has a URL like:  http://mslabs-771.vo.llnwd.net/d8/photosynth/m6/collections/c0/01/16/c00116f9-3342-4c33-91aa-d37cbeb0fba9.dzc
  4. Then change the ending .dzc to .points_0_0.bin
  5. Download this bin file
  6. Run the python script on the file (Oh forgot-you will need Python, but its a good thing to have anyway :-) )
  7. Pipe the output (that's slang for putting > temp.csv after the name of the python script) to a file like temp.csv
  8. The same guy who made the python script has a nice little Processing program (Processing is a really cool Java Graphics Tool) for looking at the data.  I used this to make the image above and it works great.
  9. If you would like to see other information about your synth these guys tell you how to look at the associated XML which has the image information.
For more information about Dr. Lowe´s work see:
And for the work of Dr. Zhang see this link:


Saturday, April 11, 2009

Cool SW for a better memory mgmt (not the one in your computer) Spaced Repetition Software




Gary Wolf a contributing editor at Wired wrote  an excellent article last year about spaced repetition software (SRS) in particular SuperMemo.  Not only is the piece colorfully set with some ice cold Baltic sea swimming scenes but it has a good amount of background on the inventor of SuperMemo, Piotr Wozniak.

On a first reading the concepts of conceptualization, internalization, memory store and memory access seem a bit hard to organize so I thought I would try my hand at diagramming these concepts (Click on the diagram Below) in the way I understand them. 



Considering what we know from functional MRI which is that the brain actively prunes unused neurons and strengthens neurons that are related to positive or pleasurable activities we might find some hints from the diagram above about concepts and memory refresh patterns to retain information.

One of the most important techniques in learning is to use as many of the senses as possible.   This helps create more refresh points or bridges which cascadingly form more connections.   By using refresh points we can see how pure memorization is helped.  Concepts on the other hand are continually being refreshed as we relate or eliminate relationships to them.  Since they are in continual use they are always easily accessible.  On the other hand the process of conceptualization is of course more complex.


The article is especially delightful because it brings out the potential of online education.  Taken together with the ambitious projects like MIT open courseware project which puts all of its course seminars and lectures online it can lead to an even faster democratization of knowledge and hence reduction of friction in a knowledge based economy.

Being a Wired magazine article maybe it is missing some links to Open Source initiatives in the spaced recollection software of which I have found at least one called mnemosyne.

Mnemosyne has a huge amount of free learning kits for everything from notriously difficult Swedish Road Signs, Spanish, Human Anatomy,  Greek phrases for English tourists and even the Bill of Rights.


Thursday, April 9, 2009

2500+ Friends Forever: the Hypernodes in Twitter



Bernardo A. Huberman, Daniel M. Romero and Fang Wu at the Social Computing Laboratory of HP Labs recently published an article “Social networks that matter: Twitter under the microscope" which differentes “real friends” from the follower/friends on Twitter.

One of the main points of the article is that real meaningful interaction on twitter is limited to a maximum of  35-40 people per person.  This meaningful interaction number is shown to be lower than the much higher follower/friend numbers showing that social networks like Twitter may not be as effective as one might expect.

This maybe the case for normal individuals within one or two standard deviations of the of the norm but a simple review shows that there many individuals who are actually highly networked and hence actually carry out conversations with much more than 35-40 people.  In fact the persons are retweeting, attending conferences and broadcasting information in a meaningful way.

These people should be considered  hyper nodes in connections theory (think Kevin Bacon). These individuals often establish their roles as massively connected through their profession as journalist, editor or social media enabler.

Network theories which discovered the hypernodes of networks have been around for some time. And they have been popularized recently with the rise of the Internet, a game about how movie stars are related, how to fight terrorism and most recently by social networking tools on line like twitter and linked in.

In fact many of these "hypernode individuals" use the
Twitter reply funcion to carry out conversations with people which they do not follow but have gotten replies from or simply comment on other peoples interesting posts.

The hypernodes are aggregators and filter the news and messages they get to provide interesting news to their followers. The more interesting and valid the news they provide is the more followers they will get and maintain.

As the researchers as the Social Computing Laboratory point out in another article entitled Predicting the popularity of online content that social media also leads itself to positive feedback loops with sites like DIGG.  This can be extended to 
Retweets in Twitter. The positive feedback loop reinforces the strength of the hypernodes in a viral way and solidifies their position adding followers.

Sunday, March 29, 2009

Twitter for Project Management: Corporate Activity Streams


Photo: Chalky Lives

Getting project members activity streams into a project management system is something every corporation will want
 – they just don´t know it yet.

Lets face it most of us are either on the phone (mobilephone or Skype), writing an email, zipping off a twitter message, chatting on IM or sitting in a meeting doing those things while pretending to listen.

So now imagine having a record of every phone call, every document you open and every web page you surf feed into a activity stream that you can retrace to find details.

Now imagine that this fantastic system figures out which activity (#mybigcustomer) goes to which billing code and to which task(#thatimportantproject).

Now imagine the PMO (Project Managment Office) as the Command and Control Center sitting and monitoring the activity streams, checking the vital signs of the projects and team members heart rates.

Sound like science fiction or some sort of futuristic nightmarish combination of 24, Aliens, Brazil and Max Headroom.

Well all new technologies can be a bit scary until you get used to them and in many cases traceability is very closely related to quality.

If we look past the scary parts we can see some clear benefits:

  • Black box: We can go back and investigate the details when things started going wrong or right in a post mortum or post implementation review.
  • Telecommuting: By having a traceable log employers can let employees work from home and for quality control audit the activity streams. Most times a realistic activity stream is harder to forge than to actually do the work.
  • Increased communications with powerful filters: By integrating all the activities into one activity stream there is more information available but it can also be easier to automatically filter.

And then there is simple fact that activity stream recording is inevitable, the benefits will be too high for any corporation not to do it.

So the real questions are when? and How do we Prepare?

The answer to when is: Soon. The answer to how could be something like:

  • Step 1: Start using the biggest activity stream out there. Its called Twitter and its free. You can categorize information with #hashtags.
  • Step 2: Start using an in house system so that confidential information can be shared. Some of the companies are already yelling for this service like HP as mentioned here. There are several open source projects that you can host to run twitter in house and there are hosted solutions like www.yammer.com 
  • Step 3: Get your PBX or corporate phone system (probably VOIP by now maybe even Asterisk), Skype to save all call data in a database with call times (call amde, talk time, unaswered calls, calls dialed etc.) and related contact info. Amazingly everybody does this for their mobile phone but nobody has it for their deskphone.  A great way to do this is with TAPI or CTI toolkits which simply save the events from the VOIP phone to any database.  
  • Step 4: Integrate mobile phone logs into the timeline by using apps for Iphones, Blackberrys, Android and WindowsMobile.  
  • Step 5: Integrate e-mail headers into the timeline.
  • Step 6: Get all your companies bloggers, tweets, linked-in profiles, web site updates into the data stream and get your product teams to integrate news and version changes of products and services into the activity stream.  A good way to start is to use a Twitter API or your in house activity stream API to get content from your content management systems, document systems, Source control systems etc.
  • Step 7: Provide tools to parse the time stream and do billing and task updates feed into your Project Management Software. Again using the API parse the data and prompot for the user to make the final decision about where the call or activity should be billed.
  • Step 8: Let people work from anywhere anytime. (If the management is worried about slackers carry out random activity stream audits.)
  • Step 9: Use data mining applications which let you correlate activity stream info to Corporate profits. (Umm let me get out my Minority Report gloves and glasses too!)

References:
Hewlett-Packard CMO Michael Mendenhall Wants A Corporate Version of Twitter
Yammer
Taking on Twitter with open-source software
Tempo with Twitter Support

Friday, March 27, 2009

Wolfram Alpha Answers When will this recession be over?


Well the question that everybody wants to know the answer to is: When will this recession be over?

What if we could ask a machine that could actually answer the question? Something like say Wolfram Alpha. Could we get a useful answer back?

One popular idea about timing the bottom is that it is never reached until everybody has completely given up hope or that until the pessimism overshots the real situation and people start to realize that things are out balance will the situation correct itself. One of the most famous investors who frames this argument is of course George Soros. Just as there is irrational exuberance on the way up there seems to irrational exuberance on the way down and it is human character too overshoot.

So how would we build a program to answer this question?

The Normal Approach:

For those of us who dare to remember high school physics this seems to be reminiscent of that experiment with a spring and mass attached. That is to say the force the spring applies is proportional (not really but close enough) to the distance that we extend it from its equilibrium point. Now if we start from rest with the spring extended at some degree there will be a force pointing back to equilibrium. But as we all know the the mass we attach to the spring, picks up speed and swishes through the equilibrium point with great speed.

So let say that the equilibrium point is where the stock market, employment levels and basic economic activity is perfectly balanced and you can also see that an extended spring would model an economy that is not in equilibrium. Now of course the economy is not one big spring but a whole bunch of different springs of all different sizes. But for now lets simplify things to a single spring.




Source: http://atlas.wolfram.com/01/01/190/

So the bottom ( or the top) is that point where the spring slows down the mass we attached to it so it just gets to a stand still. Then of course the spring pulls it back towards the equilibrium point and off we go for another bull run of the economy.

These cycles of the moving spring are called oscillations and in economics are called business cycles.

What got the spring going in the first place? The most important factors are things like technological innovation like computers, trade issues like globalization and of course wars which quickly move the equilibrium point around and cause the economic spring to stretch making people money or sending it down making them lose it.

If we could run an experiment by setting up a whole bunch of springs to represent the forces in the economy we could set the thing going and pick the bottom. One might think that this is how economist work but in fact economists don't trust models more than a few months because the know there are so many unknowns. So what they do is use something called econometric models which are short run models based on current data to project short time frames. Then they adjust the parameters of the model based on observation.

So while we have computers that can simulate an amazing amount of springs the result is often that the result has a chaotic or non-linear behaviour. In fact it seems that just adding a few springs together, maybe 4-5, you get something which is pretty unpredictable a sort of maximally complex system.

Yet there is a mystery because there certainly does seem to be business cycles. It seems that even maximally complex systems can have features that are simple or reduced.

The Wolfram Alpha Approach

Lets step back for a second. We started with an idea that things overshoot and we jumped to the physical analogy of a spring system. What if instead we just made a model which showed the characteristics of overshooting by cellular automata.


For example lets say that I use a one dimensional cellular automata called rule 190 from the Wolfram atlas. It has a cyclical nature and actually we might consider that it fits better than standard spring to model economic recessions.

So the economy isn't a spring. And spring systems aren't really linear or very simple.

Seems that for a maximally complex economy cellular automata might be a good a guess as any.

The idea here being that once a system gets just a little it complex it quickly reaches maximum complexity. Just because it becomes maximally complex doesn't mean that it cant have pockets of self organization or simple patterns.

So what will Wolfram Alpha about when will the recession end?

The good news is that the answer should be calculated pretty fast.

The bad news is that the cellular automata will do no better than current econometric theories and their error margins.

Also read this posting for more info about the job ad for the people building the models.

Wednesday, March 25, 2009

Twittfilter twitbots hashtags and more




One of the big problems with twitter is that there are lots of robot followers or followers whom simply follow everyone.  

This doesn't make so much sense - after all if everybody followed everybody else on the planet we might aswell well ... never mind lets just say its not a good idea (NxN/2).

Enter Twittfilter this brilliant tool lets you run an automatic background checks on all your new follows so you can decide if they are real people and worth a  reciprical follow.


The software is in self proclaimed Alpha stage but it has already start being usefull for me.   

While I am on the topic you may want ot check out the list at http://twitterholic.com/

Here you can check out your ranking by your location.  It is a really interesting list.  Just have to check Kevin Bacon and network theory.

And then we have http://twitter.grader.com/ which allows you to find your relative importance in the twitter universe using a formula based on tweet activity volume etc.

which alerts you to things you want to keep track of like google alerts.

to do stuff in a more graphical way.

And to find people with similar interests there is http://www.crazybob.org/twubble/.



#Hashtags

For those of you who dont know about Hashtags. These are the tags with the # sign infront of a word. With Tweetdeck its very easy to keep a seperate column with tweets for a hash tag by just using the search function for that hashtag.

Tuesday, March 24, 2009

New Kind of Science talk gives insight into Wolfram Alpha

While this talk is from 2003 it gives some great insight into Wolfram's New Kind of Science (NKS).

There are many key phrases to how NKS and Mathematica can be used to create the basic modules for calculating the answers to anything.

"One thing we have built up is an atlas of the computational world".   Wolfram compares this to a human genome database but for simple little cellular autonoma that can be used to build up complex strucutres or behaviours.  

"So besides giving new building blocks for understanding the behavior of our Universe, working within the framework of simple programs can also give deep insight into a surprisingly wide array of issues outside of the mathematical formalism of traditional science", writes Kovas Boguta of Wolfram Science Group.

The idea is that you just look for the model in the Wolfram model atlas.  Now this may take some special software and Wolfram hints that they have been using Grid Mathematica software for a million computers.






See this posting for more info about Wolfram Apha.

Monday, March 23, 2009

Mixed Reality Contact Lens



"Looking through a completed lens, you would see what the display is generating superimposed on the world outside," said Babak Parviz, a UW assistant professor of electrical engineering about a micro display they have inbeded in a contact lens.  

"This is a very small step toward that goal, but I think it's extremely promising." reports the The University of Washington News

But as the Guardian points out the real problem is how to focus on the image so close to the eye. After all you can see dust particles or fancy mini LEDs on the surface of the eye since that much too close for the eye's lens to focus on. 

"To create the focused image we have to manipulate the light rays," says Parviz. "You can create a focused image if you use laser instead of LEDs." The Guardian reports that, Parviz might integrate an array of individual micro-lenses into the contact lens. "If the pixel [the microLED] is close enough to the micro-lens, it will generate a virtual image that could be 30cm or more away from the surface. Our eyes can focus on this now."


Friday, March 20, 2009

The Future of Journalism and the Price of New York Hot Dogs




I was just following Twitter today and saw John A Byrne, the Chief Editor of BusinessWeek - a major force in digital publishing, commented, "Spoke to an experienced journalist yesterday who is now paid $1 for every 100 page views his stories get. No salary. Is this the future?".

These numbers made me sit up for a minute and think since I also have a standing offer too a few journalists I know to write content for me (since I spell way too badly) so I put that number into my business plan.

There is a lot of variation but for large volume sites a eCPM (value paid per 1000 impressions but based on click through tends to be around $1) so $1 per 100 as John says is probably pretty high. Now it maybe that the subject matter is particular or the publisher is very good at getting click through but most likely the rate should be around 1 to 10 cents per page view.

Lets say that BW gets aout 300,000 visitors per day and the average user reads 3 articles. The main feature (daily), 1 from the most popular column and 1 from deep content.

So lets say we can get 2,000,000 ad impressions with value of 5 cents each thats 100,000 dollars a day. Now lets say the overhead is 75% for management, servers, offices, a print edition thats still around, etc and we are left with $25,000 for the journalists. Lets say that we have a full time staff of journalists of 100. Thats $250/day or $5000/month. Hmmm ... this is not looking good to pay for New York apartments or martinis never mind even a hot dog.

Looking at it from the other way around you could pay $5000 the feature article $500 for 10 most popular column articles and $50 for a 100 deep content articles.

So if I am a journalist I would have to write 5 feature articles, 50 most popular articles and 500 deep articles for a chance to hang out in the news room.

With this kind of pressure its hard to even pay for airfare to an interview. I hope I got some of the numbers wrong but most likely this is the intense pressure the newspaper industry is facing.

It must be pretty easy for BW to actually calculate the earnings per journalist and the reverse. At some point some journalists may see that they are bringing in much more money than they are receiving. Some will also see the high cost of the overhead.

But most dangerous of all ... what if editors start to begin looking at these statistics and focus more and more on high paying adwords. Content will be determined by the advertisers.

I am totally convinced this is not happening today at any serious newpaper but it is common practice in the blogging and micro publishing world. As the pressure heats up its only a matter of time before the CEO becomes SEO of the publishing company.

Monday, March 16, 2009

Wolfram Alpha Search Engine



Update:  Also see this latest post about Wolfram Alpha and Cellular Automata

As a user of Mathematica in Graduate school I remember how cool Mathematica was in doing some pretty complex Plasma Physics equation work.  So when Wolfram says that he is about to do something new I am one of the first to listen.

What have we got here:
  • Natural Lanuguage (Check)
  • Symbolic Language (Check)
  • Basics of Physical Reality (Check )
  • Math (Check )
  • Cellular Automata (Check)

So I guess in just about 45 days time Wolfram will fire up the engine.  I just hope the answer to every query wont be 42.

Update:  Just reading Nova Spivacks excellent writeup and  comments on this and strangely enough the naswer may well be 42 (for those of you who dont find this number familiar, 42 is the answer to the universe given by a really powerfull computer in Hichhikers guide to the Galaxy).

OK so as Spivack explains, Wolfram Alfa doesnt simply search the web or reference data it actually calcualtes the answers.  Spivacks comments after having been demoed the system by Wolfram are astounding.  

Evidently Wolfram Alfa has done the following create "contexts" or domains of information with reusable calculation modules.  These modules might be pure math or simple programs.  

We often think of math something we have invented to explain the universe based on emperical evidence but in fact if you drop enough matches on a table you will find the number Pi which leads to the calculated answer of a circle.  This intersection between math and cellular automata in this way leads to an answer to the circumference of the earth.  So by putting a natural language processor on top and grabbing the implied context(s) and deviations you could skip the math part and vary the bottom layer algorithms of the physical universe to calculate the answer.  In other words somebody asks for the distance of flight from Madrid to Sydney and instead of calculating the arc via mathemtical formula you start dropping sticks or some reduced mini celluar automata.  
Lets say you want to know how strong the TV signal is in a valley.  First you figure out the domain which in this case is radio waves and transmission.  Youget the relevant input like radio tower locations and terrain but then you dont use Maxwells Equations you use the fact that space is 3 dimensional and that something must spread from here to there.  You include the terrain in the model and calculate and calculate and drop lower order terms.

So we can think of the stack the normal way we deal with stuff as:
  1. Ideas
  2. Language
  3. Physics and Empirically Observed Results (Theory)
  4. Math
  5. Cellular Automata of the Universe
Wolfram Alfa seems to cutout the middle and deal with it this way:
  1. Ideas
  2. Language
  3. Cellular Automata of the Universe
Update 3:  OK just ran into this job add which says that Wolfram is adding 75 positions from various diciplines.  While this add does not the actual product it seems like Wolfram Alfa to me.  They use the terminaology "data packlets".  The articles talk about hiring researchers for data mining and curating.

My guess is that these interns will be checking the validity of the results of the Celluar automata calculations. 

This is really way out there!  This is lightyears ahead of Semantic Web. 


Increasing Asterisk Interest in Africa



Interest in Asterisk based solutions is increasing like wildfire in Africa, Pakistan and Russia.  The development of African Asterix development is probably due to early efforts in South Africa aswell as the simple need to develop infrastructure services at low cost.  


Photo:  T U R K A I R O

Trixbox, FreePBX and AsteriskNow are of main interest indicating that these are new users who may very well be installing for the first time.

The correlation between internet access and hence SIP trunking to offer cheap international phone calls is no doubt a major driver of the Asterisk interest but as Asterisk knowledge increases it may spread to it use in other areas like businesses, call centers and emergency services.



Saturday, March 14, 2009

Asterisk Market Leader in New PBX Equiptment




Nortel the largest manufacturer of conventional business telephone systems, lagged Open Source by 8%, having sold 2.63 million lines,” a study by Easter Management of PBX market share concluded in January of this year.   Asterisk has 85% of the 18% market share of Open Source solutions and considering Nortels recent problems Asterisk will be the leading PBX on the market.

For those of us in the business of setting up call center services this comes as no surprise and yet the impact is amazing. 

In the end it all comes down to the Byzantine licensing costs from the major providers for their VoIP solutions which dont allow companies to leverage the cost benifits of these new VoIP technologies.  In many cases the price for a new extension is the same as before VoIP.

In addition the appearance of FreePBX and AsteriskNow as entry points are impressive since they allow for much simpler interaction with the PBX (you dont have to know how to modify configuration files like extensions.conf by hand anymore) and provide features such as whisper mode and other more eccentric functionalities.  

As far as per seat agent software goes, comparable software is either free or can be purchased for a cost of $100 as opposed to $2000 for a traditional vendor.

While similarties to the Linux Microsoft battle may be easily made it is not clear that this is really the same ball game.  Like other market segements where Open Source is making in roads one finds that there are more installations of Open Source than traditional vendor software.  This often means that there are more developers, quicker bug fixes, more functionality for the open source solutions than the traditional ones.  The same reason that windows became a monopoly.

In the end a comparison for a 20 seat full functionality call center solution tells the amazing reality that an Asterisk solution will cost around $6-10K while a similar traditional solution from the big names will be around $60K.

With this kind of functional and price superiority won't the market share increase more?  Without a doubt, but in many cases companies have a large infrastructure with the corresponding sunk costs.
It seems that the PBX market is being hit with the same kind of sledge hammer as the music industry and newspapers. 

Friday, March 13, 2009

Google and the CIA team up to use Social Media against Terrorists



"Battling the Cuban-backed Sandinistas, the Contras were, according to Reagan, "the moral equivalent of our Founding Fathers." Under the so-called Reagan Doctrine, the CIA trained and assisted this and other anti-Communist insurgencies worldwide." 

 This was a high point of the CIAs activites in the 1980s.  In later years the intelligence communities focus shifted to the NSA and computerized intelligence as a safer venue. This simple intelligence monitoring fase has now clearly fased into a new social intelligence gathering operation.  

As a leading intelligence outfit one is alwas looking for the best and most cost effective way to identify suspected spies, terrorists and people who dont subscribe to the basic premises of the consitution, a pretty big hit list lately, so you need something that:
  • Uses networking theory (you know the seven links, Kevin Bacon theory)
  • Uses social media
  • Be hosted in the cloud
  • Be cool and fun to use

Welcome to intelligence@home.  

This is a tool which allows you to take photos and label people so that surveillance cameras, NSA satellites in beach mode and web cams can help us identify in real time the motion of the bad guys.  We can all do our part.  The ASLU might not even be able to fight this obvious infingement of personal integrity since our alter egos like being hounded by Paparazii like sightings.  There is a hidden movie star in all of us.  That goes for good guys and bad guys.

So how can you help the CIA in your sparetime?

Its simpler than you might think.  Just log into http://picasaweb.google.com or http://www.facebook.com/ and get to work with the facial recognition and identification features.  

Just be ready to get a call from Jack Bauer he may need your help in something more complicated when the plutonium really hits the fan.

Want to do more.  Well the Deputy Director told me personally that he would really appreciate world citizens who make photosynths of their taged photos so that whereabouts of our suspected terrorist and/or family members can be encoded with increadibly acurate geo-encoded information.  I think he said something like.  
"Together we can make a better world.  So lets all get out there and do our part.  You can follow the results on twitter."





Friday, March 6, 2009

Count how many Earths there are





“You don’t have to just believe that this speculation is going to be correct or not. NASA will be launching the Kepler space mission, and Kepler’s entire purpose is to count how many Earths there are around a population of stars in the constellation Cygnus.” Kepler launches on March 5th.

“Then about three or four years from now, there’ll be a press conference at NASA headquarters, and Bill Borucki, the Kepler PI will stand up and tell us just how frequently Earths occur. And once we know that we’ll know how to take the next steps in the search for living planets, and some of that work will involve not only telling if the planets are habitable, but actually searching for signatures in their atmospheres if they could be inhabited, as well.”

So it looks like we have some big projects ahead of us which might just be the best way to fix the economic system after all:

1) Fix the environment Price tag: 2-3 Trillion $
2) Go to a planet that the Kepler mission finds 10 Trillion $.

Total Return on investment: Priceless!

Exploring the quantum science of watchmen




"If you turn the purple wave and reverse it so that it is now 180 degrees out of phase you add the two and the result is zero....the intrinsic field that holds all of Jon Ostermans Atoms and Nuclie together can be described by some sort of wave.  Somehow that wave is analyzed and they generate a wave completely out of phase and they remove the forces holding his nuclie and atoms together..."

That is how University of Minnesota physics professor James Kakalios describes the amazing creation of Dr. Manhattan.  The professor acted as science consultant for the movie.   And he definetly sets to teletransport us a bit father than we might feel is realistic.  But the the science of superheros is a complicated business big effects with just a  thin thread of science are very much what keeps most people glued to their seats.  

The explanation of the way Dr. Manhattan can appear in series of places is that he can control his Quantum mechanical wave function.  Excellent!!

And in true Feynman style Dr. Kakalios has even written a book called The Physics of SuperHeros.

MSNBC has also done some work analyzing this theme in a special slide show where the technology of the movie is analyzed.  But there is nothing too mind boggling here.  The only thing that seems out of reach is teletransportation.  

"So why is Dr Manhattan blue? He might just be leaking electrons" explains Katherine Harmon over at Scientific American

All the Gadget magazines in the world are tripping over themselves to make the top 10 list of gadgets from the movie which are a bit removed from your typical 007 feature.

The goodies include the flying Owl Ship, some fancy masks, the quantum wave function chamber (I think Dell includs this with their latest Inspiron), night vision googles (without the fancy features of Cinespace) and some really cool remote controls????

In the end super human powers are well....the most important feature.  And in some way the exoskelton robotoics are not so far off.

But then again who is to be sure that somebody standing to close to a Higgs Boson might not just become Mr. Manhattan.  Now thats the real reason to study physics.  

There are some really superhuman projects out there like this one.  These Canadian guys might just end up looking a bit transparent and blue if they arent careful. 

Monday, March 2, 2009

Work and Play in Venice


After a hard days of leading edge new product development there is nothing like relaxing with a a few friends for drinks near Rio Alto. 



Between shopping for Murano glass and before dinner I like to have a few Spitzers at Campo Santa Margherita.  Since this square really caters to the university crowd it is always happening during Biennale.  There is a cool dinner place which has really funky lamp shades on its tables and a cross from it there is great pizza to go.  I often just grab a slice and watch the kids play with their bikes and footballs.



Campo Santa Margherita is at #3 above

There is no canal view here at Campo Santa Margherita but the feeling of people going about their lives - stopping to chat with shopping carts in hand makes for a wonderful summer/fall evening catered with the delicious ambiance.


Sunday, March 1, 2009

Ice Hotel in Jukkasjärvi Sweden




Things are just getting cooler and cooler up in Ice Hotel in Jukkasjärvi Sweden.

After the short 90 minute flight from Stockholm to Kiruna in Northern Sweden you are greeted by crisp arctic air, the aurora boreales and a large jumpsuit clad man holding a small clipboard with your name on it. He grabs you and your sexy date's bags from the baggage claim and hands you the keys to your 160 HP artic cat snowmobile. Off you go on the 20 km trek at sometimes near reckless speeds through the artic backcountry stopping in this glacier smooth countrside only to see a moose and reindeer on your way to the Jukkasjärvi ice hotel. The parties already in full swing in the bar since a drink seems to be the best way to keep warm second only to the 4 different kind of saunas. You step out side and see the aurora waving in the star studed night above.



90 Km/Hour Solar Outback Camping Trip



Not quite your ordinary campsite.  While some people do actually camp with semi trucks this is a special camping group.  This is the campsite of a solar car race group in the australian outback.  Since the cars are solar powered they only travel during the day and under the southern cross illuminted  night dream futuristic dreams of a green and clean world where all cars silently glide around like levitated cheese platters.


For those of you who havent been following solar developement things have been getting truely interesting lately.  The key event in this area is the Darwin to Adelaide World Solar Challenge which will be held from October 25-31.  Last years results where increadibly impressive with cars averaging around 90 Km/h on their 3000 km route mostly because the requirements of the race now specify that the car must have less than 6m squared of solar panels, the driver must enter the vehicle un attended and must be in a sitting position.
The race has been dominated by the dutch Nuon team but the performance of the many of the cars is excellent.





Tuesday, February 24, 2009

Photosynth like technology with Video

While this video is a bit simplistic it does demo the ability to stich together video in real time similar to the way Photosynth creates a 3D world from pictures taken from many cameras.

A project called CINeSPACE is doing the same with Archive footage and will even allow for the viewing of the stiched video in situ in a special device.

Saturday, February 21, 2009

Publishing Model for Online

Here is a nice article about online journalism and evidently this how to make money on the web: http://www.vg.no/ .  But most JSchools will be sick to their stomachs.

Update:  Here I have done a few caculations that show that for really big sites with economies of scale working for them a 5 cent page view might hold up.  But as a reader comments for medium sized papers this is an impossible model.

Sunday, February 15, 2009

MIT Siftables for Material Assets but what about Digital Assets


Here is a great talk by David Merrill from the MIT media lab about a project called Siftables.  

Its a smart convergence of accelerometers, short range radio network(in this case infra-red), swarm, multi touch all to get past the mouse as the predominant input device for the computer.

Its kind of funny because first the computer simulated the stuff on the computer screen with the first windows applications.

And here we are interacting with the stuff on the real desktop again.  

It kind of seems like being back to square one but the fantastic ability to use altered, fabricated, quickly copied and searchable items in this morph between the real and the physical world is fantastic and evoking if not glamourous (see that TED talk for things about the word glamour you never knew).

Linking the physical world to the computer interaction paradigm has been a dream which has had the distinction of sucking up projects like a black hole - taking lots of investor money with them.  A list of failed projects and businesses including the Magic Link (pretty cool, I used to get my email on that.), eWorld from Apple and many more have dissapeared since Apple took the original GUI idea developed by Alan Kay, Douglas Engelbart, and a group of other researchers  and turned it into what we all interact with today for way to many hours than intended ;-)

But the only thing we really have left in the physical world model is the trash can and folder objects on the desktop.  And the computer desktop isnt really so physical of a thing anymore.

Enter the multitouch screen in the last few years and we saw a few demos of people throwing around cards and blocks on the virtual desktop.  But if Demi Moore couldnt sell the virtual desktop just the ability to use two fingers isnt going to be enough either.

So this idea turns things around.  Somebody said, "the network is the computer", was it Sun or was it Oracle?  Even though cloud computing is a brilliant way for people to work it still doesnt change the interaction paradigm.

In the end what this demo shows us is that while we may want to think that "our stuff could become the computer"...maybe is more like a lot of "our stuff is in the computer".  How do I sort 8000 Photos?  How do I prepare a excell speadsheet that is linked to my companies SQL database?

Some of "material assets" as opposed to our "media assets" really could have an improved interface.  And a lot of that work is being done by technology driven design.  Most modern phones know if you are holding them upright or sideways and change accordingly.  

Product design is really about the interface.  Cars where you just have to touch them to turn them on or in the worst case as in my car there is a start button (which you also use to turn it off - thanks Bill.)

Its just a mater of time before time before our "material assets" end up doing pretty much the same thing as the Siftables.  They are already doing it.

But at the end of the day what the reason the Macintosh was a hit was because it let you use a computer to write documents and do a spreadsheet and then print them on laser printer really easily.

So what we still need is a way to eliminate the keyboard and mouse.  Obviously its not about having 26 or more blocks on the desktop since we already have that.  Nor is it about moving a block around to select stuff or move stuff since we have that too.

I sure hope this isnt going over the event horizon..because it is really too cool!  But how does this become the interface paradigm to our "digitial assets"?


Saturday, February 14, 2009

Virtual Reality Mobile device




Here is a very beautiful design concept for an Augmented reality device by a talented designer. There is a very lively discussion on the post and some good links there.

Tuesday, February 10, 2009

Books Deserve a Dedicated Device Amazon Kindle




"Seemless Integrated Reading Experience" is how Jeff Bezos describes the Kindle 2 book reader in an excellent launch of the new kindle." 

"Its not just a device," Bezos empasized about what some people complained as pretty ugly device in version 1.

But despite of the ugly duckling look compared to sleek glossy shapes being toted over at Infinite loop it seems that the Amazon Kindle book sales now account for more than 10% of book sales (can that be right? - well no - the number refers to  10 percent of Amazon’s total sales in the 230,000 titles available for the Amazon  Kindle.)

Bezos then contined to explain that "What we wanted to make is the kindle dissapear.   What we are left with is the authors world."  Don't all product designers want that.  It is not about the skinning its about the experience and about the actual pardigm.

The experience which very much depends on the seemless wireless integration is fantastic.  The ecosystem for the business model is nicely tucked inside those airwaves.

To recap Bezos lists the key focus for the first Amazon  kindle:
  • Its lite: 10.3 ounces
  • It has a paper like display
  • It is readable in sunlight
  • Long battery life
Sounds Brilliant!

I wont go into the features of the new Kindle 2 except that it is impressively thin and will allow you to read for 2 weeks on a single charge.   So you wont need to take the charger on vacation.  I bet with a solar panel on the back you would never need a charge ever;-) 

But do we really need another device?

In an interview with Digits Bezos explains why a dedicated book reader is so cool and why just doesnt cut it to use your phone or laptop. 

“I love having a camera on my cellphone, but I also have a compact camera and I have a SLR camera. If photography is important enough to you, you want a device that is perfect for that. Reading is important enough that it deserves a dedicated device.”

For those of use who are product managers and new product developers the presentation offers an excellent and clear focus on "fitness for purpose".  

But seriously there must be company out there that wants to make a highgloss version with an accelerometer chip included...hmmm let me think.

Wednesday, January 28, 2009

Project Management is a "sweet spot" of CMMI




Just ran into this excelllent CMMI presentation. Here Keith Heston, a Senior Manager at Accenture, puts CMMI in perspective from a complete quality program.

For software development point of view with a Microsoft flavour we can even blend in MSF and MOF (actually Keith mentions ITIL). But elements of Six Sigma and product development and general business strategy are also mentioned.

Of course the question comes up "What is the benefit to me for implementing CMMI and how long is it going to take me to implement it.". And natually the Keith answers "it depends."

And he specifically mentions that it depends on:

  • Where you are starting from as an organization
  • What you priorities are
  • How many resources you want to devote
  • How complex your organization is
  • How many sites do you have
  • How mnay project do you have.

He focuses that Project Management as a "sweet spot" of CMMI.

You can find the audicast of an interview with Kieth Heston here.

Thursday, January 22, 2009

Obama Photosynth Inaguration




I have been plugging Photosynth for some time now as one of the really new new things and the Inaguration Photosynth really shows why.  Here you can zoom in on people in the crowd with much more resolution than in a video and from all different angles.

I wrote a short story about how Photosynth and GeoConcepts can be used in crime scenes here.

Sunday, August 24, 2008

Photosynth goes Live




Now anyone (with windows :-) ) can make a photosynth collection. The web page is now live and not only are there a whole bunch of collections made by national geographic photographers but you can also make your own.
We have talked about Photosynth and its relationship to CINeSPACE severals times here and here. So it is great to see it finally going public.

Sunday, June 22, 2008

Mashed 08




Here is the list of talks from Mashed 08. Some great stuff here aswell. Check out all that stuff they are mashing up! Too bad we didn´t get a chance to get a CINeSPACE mashed up!!

Usability at Google









Here is view inside a usability lab somewhere at google. Not rocket science as you might expect. No fMRI scanners. No laser guided eye following software. Where are the biofeedback sensors for IR, pulse etc.?


Or is this just the one they show the public ;-)

Here is the comment to my post on this:

Jonathan
June 22nd, 2008 at 3:13 am
@Mans: I’m an “HCI guy” working for a large online business. Eyetracking, biofeedback another automated testing techniques used to be fairly popular in the past, but they’re now largely out of favour with all but fresh-faced usability undergraduates. This is because automated tests generate a ton of data without telling you anything about *why* the system under test behaves as it does. While you might find out that nobody looks at the submit button, or perspires when they try to log in, what you *need* to know from that is missing.

And my Answer:

@Jonathan … Gotacha and of course first things first as you say but since it is the weekend which is for more visionary thoughts … what is really interesting is find out why we like something… which deep impulses we are triggering…This is one of my favorites , look at the diagram on page 8 and think about what is happening in those first milliseconds Let me know what you think.

Friday, June 6, 2008

Replicating Solar Panels




Ok now here is a twist on rapid prototyping. This rapid prototyping 3D printer makes itself. And to so on and so on. Now if we can get each one to make a solar panel and we start the process going Arizona or Australia we are home free.

Thursday, June 5, 2008

And Wiring in Venice with



And it looks like Wiring is being used in Venice at a sort of digital Usable Wichery?? course. Those Venice guys are an interesting crowd :-)

Friday, May 30, 2008

Blobs...





Check out these amazing blobs. I want these in my office!! Some really creative design coming out of LA. Greg Lynn was named one of the most creative people in Forbes and I can see why. This way of using recycled toys is amazing. Design doesnt stop at the outer wall.


I could even consider having these blobs in my house if I lived in something like the Frank Gehry Schnabel Residence in Brentwood. Now what would be interesting is if Dean Kamen could make the blobs not fall over when they fall down with internal gyros. Maybe I should call him.



Monday, May 26, 2008

4D Cultural Cities!! Wow!



This really combines so many of the things we have been talking about I think its a must see...

http://4d-cities.cc.gatech.edu/atlanta/

It has elements of Photosynth ( the program we demo-ed in Glasgow on Pedros laptop)

It has X-ray mode!!

And it has a timeline for the Cultural heriatage crowd which is something we have talked about at some of the meetings.

Wednesday, May 21, 2008

Design House Product Development




We have been talking lots about design house thinking in the Cinespace project so I just loved this TED talk by Yves Behar about working on the this bluetooth project. Check out the designers, circuit board developers and probably even business people at the same conference room table. Thats push and pull.


Friday, April 18, 2008

Photosynth and Venice

Microsoft has done some very interesting work mapping images and creating a navigable 3D space with its Photosynth tool.

The navigation is very slick and one of the main locations they use to demo is Venice St Marco Square.

The photos are being imported from Flickr and then use geospatial mapping to map the results to 3D.

One could imagine having this incorported into the Cinespace Device to do a very fine scale multimedia browsing.

For the geoconcepts ideas this would mean that much more highly defined areas....with things like specific stores and statues and we will need 3D volumes not polygons.

Thursday, April 10, 2008

SeaDragon and Photosynth

The Talk by Blaise Aguera y Arcas at TED demoing SeaDragon and Photosyth are really interesting. Not only navigation paradigm..mutliple touch navigation...hey that would be cool in Cinespace but also the georeferencing of Flikr images and creating a mosic with them.

Thursday, March 27, 2008

Software to GeoTag content: GNIZR

Harry Chen and Image Matters have product which geotags shared content called GNIZR. It uses the SKOS ontology for semantic tags.
For geographic mashup it uses GEONAMES which also uses SKOS.
In the work we are doing at Tracasa, Javier Ruiz is designing a new ontology for the CINeSPACE project called Geoconcepts. His Blog has some interesting discussions about various geographic ontologies liek the GEONAMES ontology and its relationship to SKOS.

Tuesday, December 25, 2007

Modular Toolkit

This is a very interesting product concept.
BugLabs
While I like using a soldering iron as much as the next guy. I think this modular apporach could really free us software guys from having to deal with to many hardware issues for prototypes. Lets see what the prices are like when they start selling the modules.

Monday, November 12, 2007

Augmented Reality Example

Don just let us know about this very cool demo:

http://www.demo.com/demonstrators/demo2007/91367.php.

Tuesday, September 18, 2007

Real Time MPEG7 Annotation Example

Pretty Cool and really useful at film festivals and Cannes Parties ?¿?¿?¿

The URL is: http://www.viewdle.com/

Wednesday, August 8, 2007

Evidently YouTube has just added videotagging...
http://google.blognewschannel.com/archives/2007/07/03/youtube-adds-geotagging-overhauls-uploader/


As for standards for encoding geotagging video closer to the HW level like EXIF I see that it is being done for mobile phone video feeds by pocketcaster.

http://www.pocketcaster.typepad.com/

Just ran into this spot about geotagging:

http://cbs5.com/video/?id=24304
http://blog.everytrail.com/category/geotagging/

Interesting that they talk about hollywood location spots in the smugshot segment

Tuesday, August 7, 2007

Comment on EXIF JPEG standard

EXIF JPEG Header to contain the LAT LON data.

A name space can be found at:http://www.w3.org/2003/12/exif/

Don't forget to include the DATUM since using the wrong datum can lead to errors of 100m or so.

Sunday, July 9, 2000

Technical Details for WiiMote Tennis Serve Toss Project


(Standard Dissclaimer: This might very well destroy anything you touch unless you are lucky...carry on at your own responsability :-) )
------------------------

Soldering the button: Top right and bottom left looking at the PCB on the button side and the On button up.

Code I added to write the text file with the acceleration values:

in SingleWiimoteForm.cs

private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
wm.Disconnect();
wiimoteInfo1.Closefile();
}

in WiimoteInfo.cs

using System.IO;

namespace WiimoteTest
{
public partial class WiimoteInfo : UserControl
{
private delegate void UpdateWiimoteStateDelegate(WiimoteChangedEventArgs args);
private delegate void UpdateExtensionChangedDelegate(WiimoteExtensionChangedEventArgs args);

private Bitmap b = new Bitmap(256, 192, PixelFormat.Format24bppRgb);
private Graphics g;
private Wiimote mWiimote;
private bool lastminusbutstate = false;
private DateTime starttime;
TextWriter tsw;

public WiimoteInfo()
{
InitializeComponent();
g = Graphics.FromImage(b);
tsw = new StreamWriter(@"C:\wiidata.txt");
}

public void Closefile()
{
tsw.Close();
}

public WiimoteInfo(Wiimote wm) : this()
{
mWiimote = wm;
}

public void UpdateState(WiimoteChangedEventArgs args)
{
BeginInvoke(new UpdateWiimoteStateDelegate(UpdateWiimoteChanged), args);
}

public void UpdateExtension(WiimoteExtensionChangedEventArgs args)
{
BeginInvoke(new UpdateExtensionChangedDelegate(UpdateExtensionChanged), args);
}

private void chkLED_CheckedChanged(object sender, EventArgs e)
{
mWiimote.SetLEDs(chkLED1.Checked, chkLED2.Checked, chkLED3.Checked, chkLED4.Checked);
}

private void chkRumble_CheckedChanged(object sender, EventArgs e)
{
mWiimote.SetRumble(chkRumble.Checked);
}

private void UpdateWiimoteChanged(WiimoteChangedEventArgs args)
{
WiimoteState ws = args.WiimoteState;

clbButtons.SetItemChecked(0, ws.ButtonState.A);
clbButtons.SetItemChecked(1, ws.ButtonState.B);
clbButtons.SetItemChecked(2, ws.ButtonState.Minus);
clbButtons.SetItemChecked(3, ws.ButtonState.Home);
clbButtons.SetItemChecked(4, ws.ButtonState.Plus);
clbButtons.SetItemChecked(5, ws.ButtonState.One);
clbButtons.SetItemChecked(6, ws.ButtonState.Two);
clbButtons.SetItemChecked(7, ws.ButtonState.Up);
clbButtons.SetItemChecked(8, ws.ButtonState.Down);
clbButtons.SetItemChecked(9, ws.ButtonState.Left);
clbButtons.SetItemChecked(10, ws.ButtonState.Right);

lblAccel.Text = ws.AccelState.Values.ToString();

// lets write the time difference from start (when minus pressed)
// the accel values untill minus not pressed.
if (ws.ButtonState.Minus == true)
{
// if we just pressed the button set the start time
if (lastminusbutstate != ws.ButtonState.Minus)
{
starttime = System.DateTime.Now;
tsw.WriteLine(" ;T;X;Y;Z;R");
}
TimeSpan timesincestart = System.DateTime.Now.Subtract(starttime);
double magnitude = 1.0- Math.Sqrt(ws.AccelState.Values.X*ws.AccelState.Values.X+ws.AccelState.Values.Y*ws.AccelState.Values.Y+ws.AccelState.Values.Z*ws.AccelState.Values.Z);
tsw.WriteLine("Time ;" + +timesincestart.TotalMilliseconds + ";" + ws.AccelState.Values.X + ";" + ws.AccelState.Values.Y + ";" + ws.AccelState.Values.Z+";" +magnitude);
}
lastminusbutstate = ws.ButtonState.Minus;

-----------------------REST OF CODE UNCHANGED ------------------