Sunday, September 28, 2008

DrawPile 0.5.0

A new DrawPile release is out, little less than two weeks after I resumed the project. This was mainly a bug fix release, introducing a new more stable and robust server and fixing many bugs and usability problems in the client.
The 0.5.0 release has one new major feature: an annotation tool. The annotation tool is pretty much like the text tool in other drawing programs, except the text always floats above the actual image. Because DrawPile doesn't have its own image format (yet), the annotations cannot be saved. They can, however, be burned onto the image (in offline mode only, more on that below.)

With this maintenance release out of the way, next up is more features!

Drawing long lines, especially thin ones, causes nasty jaggies as DrawPile doesn't support subpixel brushes at the moment. This is going to change in the next release. The latest SVN trunk already contains some preliminary subpixel drawing code. Here is how it compares to the old DrawPile and GIMP:

A pen tool that always draws with 100% hardness and no antialiasing will be added, so pixel editing will still be possible. Another new feature that will probably make it to the next release is composition modes. (Add, multiply, darken, lighten and such)

At the moment, DrawPile's tile engine isn't really being used for anything you couldn't do with a huge contiguous image. Splitting the image into tiles makes it possible (or rather, easier) to do some cool things. For example, tiles make it fairly easy to efficiently implement layers. Having layer support means we can also do things like indirect drawing.
Indirect drawing means drawing into a temporary layer first, then compositing the whole stroke onto the image at the same time. This mode seems to be the default on most other drawing programs. Indirect drawing makes it possible to paint with uniform opacity and, in DrawPile's case, removes the need for preview strokes.

There's also one other thing tiles make fairly easy to do: Undo. Unfortunately, it's not that obvious how undo should work in a multiuser environment, so that's one feature DrawPile isn't getting quite yet.

Finally, as mentioned above, the annotation tool currently cannot burn the text onto the image while connected to a network session. The problem is that there is no way to guarantee that each participant of the session has the same font and the same font rendering engine. For example, on Linux Qt uses freetype, while on Windows it uses GDI.
There is a way around this problem though. When a user decides to bake an annotation, instead of just telling others to do the same, DrawPile sends the rasterized text to the other users and they composite that instead of whatever they have. There are still some practical problems that must be worked out with this approach, but this is most likely the way to go. Incidentally, adding support for sending arbitrary raster data as drawing commands also enables features such as pasting from a clipboard.

Sunday, September 14, 2008

Continuing work on DrawPile

After a year's hiatus, I decided to start working on DrawPile again.
First thing I did, was rewrite the old server. The new server is QT based (no more other external dependencies) and built as a shared library that can be embedded inside the client and in a tiny standalone shell.
The protocol also underwent a revamp. The new protocol is much more simpler, but also lacks some of the features the old one had (multiple sessions on one server.) The reason I decided to drop these features was that they weren't being used in the client and were and unnecessary complication.
One nice feature the new server has, is the ability to buffer raster data and drawing commands. The server can then efficiently handle new clients with minimal disturbance to other users, and is more robust to boot.

The latest SVN trunk has the new server and a couple of fixes that should make DrawPile much more stable. The drawing code is still slightly broken though. Next up, a new drawing engine, then the 0.5.0 release!

Tuesday, April 1, 2008

Tesla coil update

New TC picture added. I increased the size of the top load, tuned the coil better, and managed to increase the spark length from 15cm to about 20cm.
On top of the toroid I put a sharp screw to act as a breakout point so I could more easily judge the length of the discharge. I then adjusted the tap point in until I got the longest sparks.
I also adjusted the spark gap spacing. Finding the optimum distance between the electrodes can be tricky. If too narrow, the capacitors don't have time to charge enough or the gap won't quench; too wide, and the transformer might burn out. I previously had a problem where the coil would run for about 30 seconds, then the gap would simply stop firing and the transformer emit a buzzing sound. Luckily no lasting damage was done. I narrowed the spark gap a little, and the problem seems to have gone away now.

## Bigger Tesla coil ## I've already started working on my next coil. This is actually the one I started building over 10 years ago. I have the secondary coil, the transformers, and just finished building the primary coil and a TCBOR style spark gap. I just need to order better capacitors, and I'm set. I won't bother building a protection circuit for the transformer, seeing as how it would cost more than the transformer did when I got it! primary.jpg The primary coil is a flat pancake style coil, made up of 14 turns of 10mm copper tube. Many people say that making the secondary is the worst part of building a TC, but I disagree. Making the secondary is merely tedious, making the primary is hard work! It is quite difficult to get the tube, especially a thick one, twisted into a smooth evenly spaced coil. It helps immensely to have a second person assisting. However, in the end it was easier than making the much smaller primary coil for the small TC, which had an inverse cone primary. tcborgap.jpg The spark gap is a TCBOR, or RQ, gap. Short pieces of copper pipe affixed to the inside wall of the PVC pipe function as electrodes. A fan attached to the end of the pipe provides cooling. I tested the transformers together with the gap (but without the fan) and they seem to work fine. It's interesting to note that with just the transformer connected, the gap makes a soft buzzing sound, but when the capacitors are added, the sound becomes very loud. This is of course an indication that the capacitors are doing their job; instead of a continuous spark, the gap is firing and quenching dozens of times a second.

Monday, March 24, 2008

Tesla coil

Just added a new page about my Tesla coil.
teslacoil.jpg I first started building the coil over ten years ago, but never got around to finishing it. My new coil is not exactly same as the one I first started building, but I did use the components from the original one.

The coil is around 35cm high, uses a 4kV neon sign transformer as its power supply, and currently produces sparks about 15 to 20cm long.

Here is a video of the coil in action:

Sunday, March 23, 2008

Website revamped

I decided to change the website layout back to something simpler. Some content, such as the old blender tutorials and models, I dropped altogether.