16 Aralık 2014 Salı

A few first words about film photography

It all started when I found my grandmas old camera. A Voigtländer Vitoret. It had clearly seen better days, but the old guy was still very handsome.
Voigtländer Vitoret
Sadly the lightmeter did not work at all, and the shutter sometimes decided to wait a few extra seconds before closing. In my first roll, all but 3-4 images were completely useless.
But it was still fun to shoot film, so I decided to look for a second hand (cheap) film body. Because I am a Nikon guy and not a rich Nikon guy who can afford some extra lenses for a new camera, I found a Nikon body that would work with my non-DX lenses.

Since yesterday, I am a proud owner of a F401 (N4004 in the US). I love it so far. (so much that I am probably going to write a review, so no details here).

Anyway, here are my first impressions of film photography.

Firstly, shooting film is fun. Knowing that I am saving the image on a physical object is a nice feeling. I also get to have an archive, which is pretty nice. I also like to wait to finish the roll and develop before I see the photographs. I think of the shots which can turn out well during the time, wonder if they really do and in the meantime I think about how I am going to process them (Since I do not have any equipment [yet] I can not process them the old-school way, but I play with the scans a little). I would also like to develop and print myself.

Secondly, film is not that expensive. Fine, if you are starting out, it is. But once you quit photographing your feet and every single cat you see, you barely manage a roll in two weeks in normal times. Of course you shoot more when traveling or on special occasions, but keeping a digital compact camera, or better yet a cell phone, for soccer mom facilities, the number of shots (with artistic intention) made is very little.

Thirdly, shooting film helps I think a lot more about each shot. I started to do the same with digital too, and I guess better photographers do it way more, film does motivate me to do so, neat. Just like prime vs. zoom. When shooting zoom, you should walk around a bit and check other angles, shooting with a prime, you almost have to.

Finally, film grain looks way better than digital noise.

Here are some photos from my first roll. For more, or these scanned better (soon) check out my tumblr.

20 Mayıs 2014 Salı

Lego EV3 Cannon

Cannons are awesome. Robots are awesome. Lego is awesome.  So, why not combine them all?

Here is a short video of the awesome Lego cannon:

The robot is build using the pieces that are available in both EV3 kits and is programmed (sadly) in Java on LeJos.

This file contains building instructions of this model and this is the model itself created using the Lego Digital Designer. For those who don't want to read a step by step guide, here is also a brief description:
You need to place the motor that creates the horizontal movement in the bottom, because else a) it also makes a vertical movement depending on the angle of the other motor b) it won't be stable enough. In order to increase stability, you need to construct a table, on which the other motor (connected to the first one and carrying the last one) can glide, because this one carries some weight and is likely not going to stay parallel to the ground without. Lastly, you place the Medium Regulated Motor onto the last one with the shooter. I have used the system from the EV3RSTORM model of LEGO with some minor modifications on connection to the rest of the system.

The source code for the robot is on my github. To get it running, create a Lejos project, add this file to src directory, compile and upload to the robot.

You can control the robot using the arrow keys on the intelligent brick, shoot using ENTER button and end program using the ESCAPE button.

Now go start shooting dummies or your innocent house-mates while I am working on the computer interface to control the cannon via Bluetooth, which I will probably post here if it even gets complete. Feel free to modify the design and/or the code and share them here!

29 Mart 2014 Cumartesi

How to use Gtk+3 Popovers with Python

Popovers are great. If you do not know what they are yet, have a look here, or here. They are like right click menus, but way more functional.

However, there is yet so little documentation, and only an example in C by gtk3-demo, so I have needed some time to get it working on Python, and this is why I am posting about this.

from gi.repository import Gtk

def on_click(button):
    if popover.get_visible():

#Creating the window
window = Gtk.Window(title="Hello Popover")
window.connect("destroy", lambda w: Gtk.main_quit())

#Creating and placing a button.
box = Gtk.Box(spacing = 60)
button = Gtk.Button("Toggle popover")
button.connect("clicked", on_click)

#Creating a popover
popover = Gtk.Popover.new(button)
label = Gtk.Label("Hi!")



So, here is what I have been missing.
Firstly, popover = Gtk.Popover(); popover.set_parent(button) does not work.
Secondly, popover does not show up, if there is not enough space in window (it actually does, but is not visible). This is why the button is wrapped in a box in this example.
Lastly, if the content is smaller than the arrow, so will the popover be, which looks ugly, so you may want to set a size request if there is only one label in the popover. However, I can not think of any practical reason to create a popover with a single label in it.

Happy hacking!