Thursday, November 27, 2008

Hacking the Webmail Notifier USB device

Some time ago I ordered the USB Webmail Notifier (only $17). When I received it, I was disapointed to find that the bundled software was very limited, only using the POP3 protocol. This protocol for example has no way of returning number unread mails, so the use cases are rather small.

So I decided to look at how I could code for this device. I found this very useful (albeit quite old) article on USB HID devices, a wery well though standard for this kind of devices (and keyboards, mouses, joysticks).

I also used a USB protocol analyzer to see what data was sent to the device. I managed to make it accept any color I want (whereas the bundled software only has green, red and blinking blue).

Each component is 5 bits, that makes some noticable transitions between adjacent colors. Also not all colors we use to get on LCD displays are available, because there is no black.

Here is a small image of an orange notifier.

I made 3 command line programs (building them requires the Windows DDK):
  • a simple color setter, arguments are R G B
  • a HUE wheel switcher
  • a CPU usage related color, green beeing 0%, red 100%
There is certainly many other possible uses for this cheap device:
  • An IMAP4 mail notifier, making use of all IMAP4 features
  • An automatic build indicator, for example for CruiseControl
  • an event remainder
  • ...
As usual source code will be send on request.

Friday, November 21, 2008

Biggest image I have ever created created

While browsing Wikipedia I found some code to generate nice fractals.

I have adapted the code to create really huge images.

The largest I have to date is computed at 512000 x 300000 pixels. The image is black and white, I use a binary fromat to save space (1 bit/pixel), that still makes the uncompressed file about 20 Gigabytes. Computation time on a Core2Duo 2 Ghz is about 4 days (with some pausing).

I then compute a multiresultion tiff of half size (because it looks better). The final image is about 256000 x 150000.

Here is a detail:

Code I have wrtitten uses OpenMP #pragma. I had the opportunity of trying this code in a new Intel machine that has a total of 16 threads (2 CPUs x 4 Cores x 2 Hyperthreads).  Using a single  parallelfor  instruction allowed me to gain a factor of 10 over single threaded code. Not too bad.  Of course dynamic threads ala Intel TBB would have allowed further gains, but at the expense of more code.


Friday, August 22, 2008

Massive mesh

In order to generate the 3d objects for my fractals, a large number of triangles have to be generated, so that very detailed areas are not badly rendered.
I can generate up to 2 Billion triangles, more than 50 Gigabytes of data.

In order to see the result, I have modified my small viewer so that drawing is done reading directly the triangles on disk. This takes about 1 hour on my machine, but virtually unlimited number of triangles can be displayed, even on a basic computer.

The following object has exactly 1 447 147 377 triangles.

Of course for interactive display the number of triangles is reduced to about 10 000 000.

Sunday, August 3, 2008

Fractal 3d Object Video

Here is a small video I made from one of my objects.
It is a real 3d object, not a ray-traced rendered animation.
My graphics card is a GeForce 7600GT (not very fast these days).
This card is capable to display about 5 000 000 tris/s lit, shaded.
As I have objects with up to 10 000 000 triangles for the most detailed objects, and about 3 000 000 for standard objects, framerate is not very high. I am thinking of upgrading to a more recent card, such as an ATI 4850.

I am using custom software to display the object.

Saturday, August 2, 2008

Quaternion Fractal Slices Video

I have uploaded to Youtube a video that shows slices from one of my quaternion fractal 3d object.

It is created by the same code that is used to create the 3d object.

Tuesday, July 15, 2008

VLIV on a powerful machine

I had the pleasure to test VLIV on a bi-quad core Xeon 2.5 Ghz.
OS was Windows XP 64 bits.
It is very smooth (who would have guessed ?).
Note that recent VLIV version use multiple threads when possible.

I am now dreaming of a 30 inches display...

Vliv web site is down

It looks like VLIV web site is down.
As I have no time to check what happens, if you are interested in getting VLIV, please send a request to me.

Sunday, February 10, 2008

VLIV plugin for Windows HD images

Following the recent announcement of standardization of HD Photo by the JPEG group as JPEG XR, I have investigated implementation of this format as a VLIV plugin.

My code uses the COM API called Windows Imaging Component, available in Windows XP SP2 and Windows Vista. In theory, any image codec supported by WIC should be accessible by VLIV now, but I have only tested HD Photo images.

The API supports tile loading, even if the native format does not support it.

Microsoft also has a porting kit for non-Windows platforms.

As always, please contact me for plugin code sample, it consists of very few lines of C++.

Sunday, January 27, 2008

Vliv first support for 3D Connexion SpaceNavigator

I have implemented the necessary code to take advantage of my new Space Navigator USB device.
Right now, only panning is supported, but it is yet incredibly fun...
The Personal Edition of the device is quite affordable at $59.

Where are the cheap 3d printers ?

In 2007, there has been a rage about cheap 3d printers.

Two have been announced, with early 2008 availability. One is even taking advance order !

The first one is Desktop Factory, advertised at $4995

The second one is 3D System's VFlash, advertised at $9900

None of them is available, and I am starting to wonder if they really exist, as it's now been several months nothing very new has appeared on their Web sites.

Tuesday, January 8, 2008

Fun with plugins

In a previous post, I was talking about an image that contained all frames of a movie, with precalculated zoom levels.

I have now created a specific plugin, that reads AVI files, thanks to Win32's AVIFile API.

The image from the AVI is now completely virtual, and tiles are created on demand.
It is even possible to zoom out 3 levels, at a performance cost because each time you zoom out, 4 times the previous number of tiles have to be loaded.
On a sample movie (640x352), this does not look so bad and complete movie is browsable.

Here is a screendump:


As usual, source code or dll for this plugin is available on-demand.

Sunday, January 6, 2008

A sample plugin for Markus-Lyapunov fractals

Happy New Year !

I have implemented a very simple plugin for displaying Markus-Lyapunov fractals in VLIV.
For more information, see Wikipedia entry.

They are very simple to implement, but are very CPU intensive, so I have limited the number of iterations to a very low number, and the formula is the simplest (AB) by default.

As usual the image can be zoomed at very high levels.
This plugin benefits very much from multi-core CPUs.

Here is a screendump:



Please send me a message if you are interested in this plugin.