Category Archives: Personal

On a personal note….

Half of all the blog posts I write seem to begin with me semi-apologetically mentioning how long it’s been since I’ve last written something down here (apologising to who, I’m not sure) or about the 3D scanner (which is still making progress). Well this one shan’t (except in this round-about sort of way). This one shall begin with me stating:

I’ve Been Busy.

Trying to stay true to my new years resolution of “doing more stuff” I’ve taken up rock climbing again and I’m thoroughly enjoying it, I’ve also done a bit of snowboarding which was immensely fun, and to top it off I’ve also drunkenly agreed to go along to one of the tango lessons my landlady teaches…. although i may slightly be regretting that.

Kindle!

I love books, and for a long time I despised the idea of e-books, they seemed so impersonal and transient compared to a solid physical object that you could hold, see and smell (who doesn’t like the smell of fresh print, or old dusty and worn books?). Until 4 days ago i had read the grand total of one e-book (the excellent Makers by Cory Doctrow, a massive inspiration for the 3D scanner project), if it wasn’t for how good the book was my total would of stood at 0 e-books, the experience of endless scrolling and reading a backlit screen for extended periods of time is both tiring and uncomfortable.

I’d occasionally eyed kindles and other e-ink display readers in shops and over peoples shoulders on the tube, and apart from being mildly impressed by how nice the screens are to read, I was never terribly taken by them. “Why not?” I started asking myself, I have a stack of books sitting at home with the spines un-cracked, i have piles of books I’ve impulse bought, read once and then left in a box to collect dust and I’m forever ferrying books between London and Manchester to read on the train. These books are doing nothing more than taking up space and/or weighing my backpack down, an electronic device that could hold all of them would be perfect.

So i bought myself a kindle.

The moment I knew it was awesome was when I forgot I was reading a book on a kindle. While reading books normally I often get so “into it” I don’t consciously realise I’m turning the pages, or that my eyes are skipping along lines of ink, the physical book just sort of melts away. That’s the same experience I had reading my first book on the kindle.

I’ve read two books on it so far and its been excellent. The screen is easy to read, they’ve refined the button placement almost perfectly on the 3rd generation, and the ability to download any book at almost any time over 3G is incredibly useful (although the web browser leaves a little to be desired, but hey it’s not what it’s aimed at).

There are a few downsides. There’s been many times I’ve looked up a book only to find it not available for the kindle (although hopefully this situation will only improve with time), the keyboard it pretty mediocre, and I don’t like the restrictive DRM they put on books downloaded from the amazon store (I’ve heard rumours that the e-book manager calibre has some helpful plug-ins to deal with this). I can also imagine it not working very well with books that use the physical properties of the book as part of the narrative (Such books as Albert Angelo by B.S.Johnson), but with that in mind the form of the kindle, along with amazon working on an SDK, has potential to open up a whole new realm of narrative possibilities (keeping my fingers crossed for a revival of choose your own adventure books).

I’ve also jail-broken it so I can do custom screen-savers (some of the built in kindle ones are a bit freaky), and although its not exactly original I’ve done this to it:

I mean, come on. Portable, connected to a free world wide network (I bought the 3G version) with access to wikipedia/wikitravel…..

Bloody hell……. I was going write about some other stuff I’ve been doing but this post has practically turned into me spouting my opinions of the kindle. Well Amazon, enjoy your free publicity on this grand Blog with its staggering readership of about 2 (hi Lawrence!).

Advertisements

Robot Arms, Chaotic Python, and London

So I’ve moved down to London, which is kind of like Manchester except the buses smell slightly better. In a hostel at the moment with a 1Mb connection and a single router for the whole place so internet is somewhat intermittent.

While i’m without tools, building materials, and internetty distractions I’ve finally decided to learn some python, which, i have to say, is starting to grow on me quite a lot. It’s like programming is fun again rather than just a tool to get stuff done with. So without further ado here is my first python program. It uses pyglet (which is awesome) to plot the points of this equation: x_next = x*r*(1-x)

#! /usr/bin/env python

from pyglet.gl import *
from pyglet.graphics import *
from pyglet.window import key

class HelloWorldWindow(pyglet.window.Window):

    def __init__(self):
         super(HelloWorldWindow, self).__init__()
         self.param = 2.8
         self.start_val = .34
         self.y_vals =[0]
         self.create_chaos()
         self.label = pyglet.text.Label('PgUp/PgDown-Starting Value Up/Down-Lambda Value')

     def on_draw(self):
         glClear(GL_COLOR_BUFFER_BIT)
         glLoadIdentity()
         for count in range(0,800):
             pyglet.graphics.draw(1, pyglet.gl.GL_POINTS,('v2i', (count, int(self.y_vals[count]*200))))
         self.label.draw()

     def create_chaos(self):
         self.y_vals =[self.start_val]
         r = self.param
         for x in range(0,800):
             self.y_vals.append(self.y_vals[x]*r*(1-self.y_vals[x]))

     def on_key_press(self, symbol, modifiers):
         if symbol == key.UP:
             print ['Lambda: ', self.param]
             self.param += 0.05
             if self.param >= 4:
                 self.param = 4
         elif symbol == key.DOWN:
             self.param -= 0.05
             print ['Lambda: ', self.param]
         elif symbol == key.PAGEUP:
             self.start_val += 0.05
             if self.start_val > 1:
                 self.start_val =1
             print ['Lambda: ', self.start_val]
         elif symbol== key.PAGEDOWN:
             self.start_val -= 0.05
             if self.start_val < 0:
                 self.start_val =0
             print ['Lambda: ', self.start_val]
         self.create_chaos()

if __name__ == '__main__':
     window = HelloWorldWindow()
     pyglet.app.run()

PgUp/PgDown adjust the starting value of x while the up/down keys adjust the value of r.

The equation is from the book Chaos by James Gleick and demonstrates a chaotic system (keep pressing up and see how the system becomes stable in multiple states before turning chaotic).

The system stable in one state


The system stable in multiple states


Things getting chaotic

I really can’t describe it as eloquently and simply as the book, which i highly recommend reading.

In other exciting news i bought a hydraulic robot arm from a car boot sale for a mere 40 pounds!

My good friend lon who helped me transport the arm to my parents (hello lon! Your probably the only one whos gonna read this 😉 )


Me attending to the arm

Kind of frustrating not being able to play with it being in London an all, but with my new found python&pyglet skillz i’m gonna try and write some inverse kinematics code to control it when i finally do get my hands on it. If i get some free time/ internet i’ll post some details about it.

I’m a bird

and I can tweet. hear my twitter! https://twitter.com/MatthewShotton

3D Scanner – ExtraMini Update

Just finished a pretty sketchy algorithm to fill in the holes left by scanning errors so i can now create surfaces on the models. Been hittin the JW red label while coding in celebration of the purchase of some wheels, so can’t be bothered to write an explanation of how it works just yet.

Here is a picture of a full model, algorithm isn’t perfect, needs more work. But for now it gives a fairly rough but almost respectable skinned model.

Skinned 3D model

I think a lot of the nosie issues are related to the laser line being to diffuse. Gonna try and do something about that, not sure what yet.

Maker Faire and Light Field Camera Part 2

I spent this weekend at maker faire in Newcastle helping run a stand for work showing off some of the stuff we’d been working on, as well as the newest version of the light field camera.

All in all it was a shattering but pretty incredible experience. I got to ramble incoherently to hacker extraordinaire Mitch Altman about light field photography ( first thing i said: “I know you! your from the internet, your awesome!”, bit of a face-palm moment), bumped into fellow instructable-er Gmjhowie and had a brief chat, listened to that muse riff played on a 3 giant tesla coils non-stop for 2 days (pretty cool to begin with, but begins to feel like electrified nails being driven into your brain after a while), met up with my good friend Lon (plus a Dalek) and got to see an unbelievably cool range of different hacks and makes.

As for the light field photography rig, I’ve decided to shelve it for now. This is because I’ve done pretty much everything I wanted to do with it (apart from generating accurate 3D models), and mostly so I can get on with a few other hardware and electronics projects that I’ve been meaning to do for quite some time and that aren’t so closely related to what I do during the day for my real work.

For any one interested in the software I wrote for this, it’s not really in a suitable state for release (weird dependencies, pretty badly written and kinda slow). I’d recommend checking out http://www.futurepicture.org who have written a program that does everything mine does and more, they also have a bunch of instructables that do a good job of explaining what’s going on.

http://www.instructables.com/id/DIY-Camera-Array-2-Computational-Refocusing-With-/

As one final hurrah here is the final set up with a decent camera on it:

LF Camera

And an example of the kind of things you can do with the images you capture:

LF Image

I may post some more images later on that I capture with the camera, but for now that is all……..apart from this: you may be able to create light field photo’s by recording video while moving at a constant speed (i.e on a train) , extracting the frames and sticking them into a light field processing program.(I tried this on the way to maker faire with limited success, due in part to my somewhat crappy video camera).

…..*garfumple*……..*cough*..

This is my spangly new blog. I’ll be unashamedly hoaring out things I make/code for one and all to enjoy.