tisdag 12 maj 2009

The power of a reversed lens

Do you own two or more lenses and want to try out some inexpensive macro photograhy? Good!

In my last post I wrote about doing macro photograhy with cheap macro filters. This time I'll show you another inexpensive method of doing macro photograhy using a lens on your camera and a reversed lens in front of it.

How to do this? You simply take a lens, reverse it and hold it in front of the lens on your camera. I used a Nikkor 18-55VR as the reversed lens and a Nikkor 55-200VR on the camera. To hold the lenses together you can use for example electrical tape. Electrical tape is good because it doesn't leave any marks when you remove it. Instead of tape you could buy a reverse filter from Ebay. They are cheap, and are made for mounting stuff like lenses together.

My Nikkor lens is defaulting to a very small aperture when not mounted on the camera. This makes it very hard to actually see anything at all when taking photos using this method, since the lens is letting through so little light. What you have to do is find a way to lock it at a bigger aperture or manually set the aperture. My lens has got a little mechanical switch at the top of it, with which you can set the aperture. I used two broken matches to hold the switch, as you can see in the following picture:


If you're not as lucky as me, and your lens hasn't got any manual switch, you will have to find some other way to set the aperture. One way could be to set the aperture while having the lens mounted on your camera, and then removing it with the camera still being turned on. But this is not something I have tried, it could damage your camera, and I don't recommend it. So try this at your own risk.

Now you're ready to try out some, still inexpensive, but better macro photograhy. It's not a method as flexible as using macro filters, but the result you'll get is much better.

This is how my setup looks:


And the following is a picture I took of a (this time dead) fly.

Click on it to get a bigger version!

This method is cheaper than using a real macro lens. It's not as flexible as using macro filters (or a real macro lens), but the results is quite good. And as always, if you want better quality, you'd have to buy more expensive equipment.

måndag 4 maj 2009

The power of cheap macro filters

What do you do when you want to do macro photograhy, but don't have the budget to buy a proper macro lens? You buy a cheap macro filter kit from Ebay! A kit with 4 filters cost about 12$, and is a great way of trying out some macro photograhy.

The result is of course not to be compared against using a real macro lens, but still OK for some experimenting at home.

The following is a picture I took with a Nikon D60 using a Nikkor 18-55 VR lens with a +4 and +10 macro filter mounted:

What you see here is a Musca domestica, or simply a housefly, which was sitting on the wall in my mothers house. The fly was probably meditating or something, because it was not moving that much. The picture is taken handheld using the pop-up flash, which, together with the cheap macro filters, also speak against a better quality of the picture.

torsdag 23 april 2009

How to install the wxWidgets library in Mac OS X Leopard

wxWidgets is a cross-platform toolkit for developing programs using only one codebase. Most important of all before talking about its features; it's open source and free both for commercial and non-commercial usage.

wxWidgets has support for Win32, Mac OS X, GTK+, X11 and more. You can do many kinds of things with wxWidgets: Graphical User Interfaces, sockets, multithreading, loading images, connecting to databases and much more. It also has bindings for many different programming languages, but I will only focus on C++ here.

Ok, it has got all those fancy features. But why choose wxWidgets and not any of the other various toolkits which are available? Well, first of all it's open source and free, which I mentioned above. Secondly, it makes use of native controls in the different platforms instead of emulating them, which I personally find quite nice. No ugly emulated controls, which many other toolkits use.

These things together with good online documentation and an active forum makes the decision about which toolkit to use quite easy for me. Of course it depends on what I'm developing, but for many of the tasks wxWidgets is very usable.

There is also a book available, written by one of the original creators of wxWidgets. I can recommend the book, there is very much usable information in it. It's actually available for free download online as a pdf, since it's part of Bruce Peren's Open Source Series. But having the book in paper form can be really handy when you're coding.


Installing wxWidgets in Mac OS X Leopard
I've only tried installing wxWidgets in OS X 10.5 since it's what I'm using. But according to the documentation, wxWidgets should work in OS X 10.3 and above.

  1. To be able to compile and install wxWidgets you have to have Apple Developer Tools installed on your system. It can be found either on one of the CDs which came with your Mac, or downloaded from Apple Developer Connection (requires a free registration).

  2. After installing Apple Developer Tools you're ready to download the wxWidgets source archive, wxMac. Do this from the official download site.

  3. Unzip the source archive and change directory into the wxWidgets directory.

  4. Run the following commands:
    $ mkdir macbuild
    $ cd macbuild

    $ ../configure
    $ make

  5. The wxWidgets library should now be compiled and ready to be installed. Run
    $ sudo make install

    To install wxWidgets on you
    r system. If everything is OK, you can now start developing your own programs using wxWidgets.

  6. (optional) Compile a test program and run it to make sure everything is working.

    $ cd samples/minimal

    $ make
    $ open minimal.app

    If a window like the one above starts then you have succeded. Now you really can start developing your own programs.

This was all. You have now installed wxWidgets system-wide as a dynamically linked library. Happy coding!

Recommended reading
General tutorials and guides: wxWiki
wxWidgets FAQ for Mac: Mac FAQ
Especially the last part about "Why can't I set focus to my wxMac application?" can be interesting.

onsdag 22 april 2009

The attack of the ants

What happens when ants discover foreign things in their anthill? They try to kill the foreign scary thing of course! My remote had a weird smell of formic acid for the rest of the day...

This is actually just a test of uploading pictures.

But anyways. The story is true. I don't know why I did it.