Samstag, 26. Januar 2013

Fractal Chaos

I have always loved fractal, recursive, patterns. I recently was curios to find out what a rhombus would look like, if you inscribed a rhombus (inscribed with a rhombus(inscribed with a rhombus(inscribed with a rhombus(etc.)))) on each of its sides. I implemented this in processing, using 60° angles and letting the size of each iteration be one third of the original. I was both surprised and disappointed at how regular the pattern was which emerged.


Ways of making the pattern more interesting was to asymmetrically allow some rhombi to be double the size of others.  


Allowing all the rhombi to be two thirds the size of what I originally planned also yielded a pattern I quite liked:


Especially, if I increased the number of recursive iterations significantly:


Changing the size of the rhombi to random values resulted in an odd cloudy shape:

I

I liked this effect, so I tried to emphasize it, by using thicker lines and transparency


I also used this to make a simple animation to a song of mine I put on youtube. Nothing flashy, I was just playing around and liked the result so I uploaded it:





For those interested, here is the code. If anyone else comes up with some fun fractals, feel free to link to them in the comments section:

//fractal pattern by Paul Strohmeier
//based on one of the processing examples
//paul.strohmeierATgmailDOTcom
//fkeel.blogspot.com

int counter = 0;

void setup() {
  size(1900, 1900);
  translate(width/2,0);
 //rotate(radians(-90));
 background(0);
 stroke(20,100,190);
  rhombus(250);
}

void draw() {
  save("fractal4.jpg");
}


void rhombus(float third) {

  if (third > 1) {   

    pushMatrix();    // Save the current state of transformation (i.e. where are we now)
    
    rotate(radians(60));  // Rotate by theta
    line( 0, 0, third, 0);  // Draw the branch
    line(2*third, 0, 3*third, 0);  // Draw the branch 
    pushMatrix();
    translate(third, 0); // Move to the end of the branch
    rotate(radians(-60));  // Rotate by theta
    translate(third,0); // Move to the end of the branch
    rotate(radians(60));  // Rotate by theta
    rhombus(third/3);       // Ok, now call myself to draw two new branches!!
    popMatrix();
    
    rotate(radians(60));  // Rotate by theta
    line( 0, 0, third, 0);  // Draw the branch
    line(2*third, 0, 3*third, 0);  // Draw the branch 
    
    translate(third, 0); // Move to the end of the branch
    rotate(radians(60));  // Rotate by theta
    translate(third,0); // Move to the end of the branch
    rotate(radians(120));  // Rotate by theta
    rhombus(third/3);       // Ok, now call myself to draw two new branches!!
    popMatrix();
    
    
   
    pushMatrix();    // Save the current state of transformation (i.e. where are we now)
    rotate(radians(60));
    translate(3*third,0);
    rotate(radians(60));
    translate(3*third,0);
    rotate(radians(60));
    
    rotate(radians(60));  // Rotate by theta
    line( 0, 0, third, 0);  // Draw the branch
    line(2*third, 0, 3*third, 0);  // Draw the branch 
    pushMatrix();
    translate(third, 0); // Move to the end of the branch
    rotate(radians(-60));  // Rotate by theta
    translate(third,0); // Move to the end of the branch
    rotate(radians(60));  // Rotate by theta
    rhombus(third/3);       // Ok, now call myself to draw two new branches!!
    popMatrix();
    
    rotate(radians(60));  // Rotate by theta
    line( 0, 0, third, 0);  // Draw the branch
    line(2*third, 0, 3*third, 0);  // Draw the branch 
    
    translate(third, 0); // Move to the end of the branch
    rotate(radians(60));  // Rotate by theta
    translate(third,0); // Move to the end of the branch
    rotate(radians(120));  // Rotate by theta
    rhombus(third/3);       // Ok, now call myself to draw two new branches!!
    popMatrix();
    
  }
    
    

}

Montag, 21. Januar 2013

Magnetic Implant & Sensing Electromagnetic Fields


The Implant

About six weeks ago I met Samppa von Cyborg in Paris and got a magnetic implant. I had seen these before in action on Aneta von Cyborg, who magically collected all the bottle-caps from the table by the power of her magnetic implants.

Here is my own implant in action:



Samppa did an amazing job with the implant. I had seen pictures of the procedure on the internet before and some of them where not pretty. Samppas method would have taken about 3 minutes and was completely painless. I said *would have* as I almost fainted when I saw the 4mm needle he used or punching a hole in my hand :-D. After the incision was made and the magnet implanted, the wound was closed with a band-aid. All in all the implanting procedure was probably less unpleasant than donating blood.

It healed up quick enough as well, the image you see above was taken about a week after I got the implant.

There where two factors which played in with where I had the implant done. a) I wanted it to be out of the way so it does not interfere with my work with electronics and b) I wanted it in an area which is as sensitive as possible. Ultimatly I let Samppa decide where to put it, as placing was not really important to me and I felt  that if I have the chance, I might as well take advantage of his experience.

The reason I got it was also two-fold. I am interested in body modifications and I felt that having an implant done myself would allow me to get a better feeling and intuition about modding. The main reason however was the promised "extra sensory perception" which the magnet delivers: in theory, if you move your hand through a variable electromagnetic field, it will make the magnet vibrate. This allows you to "feel" these fields.

Sensing Electromagnetic Fields

Initially I was actually disappointed by the magnet. It was either deeper in my hand or weaker than the ones Aneta has in her hand which made it impossible to pick up bottle-caps (which, to be honest, I was really looking forward to :-D...).

About two weeks after I got the implant, I accidentally (ok, not completely, it was more out of curiosity) moved a strong magnet too close to the implant. The magnetic fields did not align, which caused the magnet to twist. This was not a pleasant sensation. (though it didnt hurt. it was more like my hand tickled from the inside.) I assume this was not especially beneficial to the healing process.

After a while, however, I almost forgot I had it and stopped fooling around with it.

Now, on a (relevant) side-note I recently also got myself a new laptop. A small 11" Lenovo thingy. Its so small, that as I rest my hands on it for typing etc, part of my palm lies outside of the area of the laptop. So when the laptop starts working harder, I feel the warm wind of the laptops ventilation on my palm.

Now this evening, I wanted to heat some milk, and because I was holding something in my right hand, I used my left hand to turn on the microwave. Immediately warm wind started blowing against my palm. If I where using an oven this would not have surprised me, but a microwave is not supposed to have warm wind. I put down whatever I had in my right hand and reached for the microwave again: No warm wind. I reach out with my left hand: Warm wind. For a second I was completely confused and all of a sudden it hit me: this was the magnet. I was feeling the magnet. 

Once I realized that, the sensation slightly changed - it was less warm wind and more a feeling of its own (but still sort of warm-wind-like). I was able to map out where the field was. Interestingly it was super loopsided, expanding far into the room on one corner of the microwave, while I could hardly feel it one some other corners. 

I assume I had probably been feeling the magnets effects for quite some time now without noticing, usually in connection with the fan of my laptop (possibly the laptop fan even was what induced the magnet to vibrate?). As the vibration probably occurred at the same time as I felt the with warm wind of the laptops fan, I assume my brain somehow linked these two sensations.

I am not quite sure which part I find more amazing. The fact that I am actually able to sense these electromagnetic fields, or the fact that they feel like warm wind to me.

Some friends regularly ask me "have you become a cyborg yet?" I guess as of now I could tentatively answer with "Yes". 

On Vulnerability

I have been thinking a lot about the side effects of my implant. In essence it makes me more vulnerable. I introduce new ways of hurting my body. Most notably, going into an MRI scanner is probably a really, really bad idea. (which is actually quite relevant for me, as I would love to be able to play with fMRI.) 

So somehow it is an exchange of vulnerability for sensory perceptiveness. This fits in with a lot of how I experience technology. It lets us do amazing things and it makes us a lot more vulnerable, as it creates dependencies. It also fits in with how I experience our senses. The better our ears, the more vulnerable we are to the noise at concerts and other loud events (which are usually a lot louder than is safe for our hearing.) So in essence, the better our senses, the more ways we have of getting hurt. This makes lots of sense somehow.

Now (even though I am running danger in being cheesy) I guess this goes for emotions as well. The more emotional you are and the more you are capable of showing love for something or someone, the more you expose yourself and invite hurt and pain. I find it interesting that this exchange of capabilities for vulnerabilities exists over all these different domains.



But anyway. I digress. I was talking about magnets. In my hand. Which let me feel variable electromagnetic fields. Which is. well. Pretty bad-ass in my opinion :-D

Freitag, 23. November 2012

Programming an ATtiny85


I recently decided that I wanted to use an ATtiny85 for a small project I have in mind. So I ordered a couple from DigiKey. Once I got them I realized that I only had a very vague Idea on how to go about programming them. 
I ended up following instruction from the brilliant people of the High-Low Tech group at MIT: http://hlt.media.mit.edu/?p=1695 

Some things I noticed:
- Their instructions do *not* work with Arduino 1.0.2.
- Dont forget to select the correct board *and* the correct programmer (selecting a programmer was new to me, its in the "tools" menu)
- Yes, the Capacitor is essential. I didn't have 10uF capacitor around the first time I tried it. I tried various wrok-arounds (multiple capacitors in paralel, larger values, smaller values) and nothing worked. (In retrospect, at one point I did get it to work without the suggested capacitor, however there was a different problem, but I was unable to fix it, as I assumed it was the cap. So my recommendation: Just get the capacitor and it'll save you trouble.

Also, use the suggested debugging LEDs. It makes it a lot easyer to understand what is happening.

Here is my setup:


Green LED tells me the ATmega is talking to the ATtiny:


Once I finally got it running I basically fell in love. This thing is sooo simple. It works like magic. No external oscillator, no nothing. It just works. I think in many situations, once you have the initial setup its easier to use than the Arduino. I realized I will want to program ATtinies more often, so I decided to make myself an ATtiny programming shield:


I used a protoshield which I piked up from the METALAB at some point and had lying around. I connected everything like so: 



In addition I added a yellow LED + Resistor on pin 9 (Heartbeat - tells me the programmer is working OK). I also added a red LED on pin 8 (Error) and a green one on pin 7 (communication). The small green LED you see next to the ATtiny is for double-checking if everythng works. Its connected to pin 0 of the ATtiny and is executing the 'blink' sketch which I just uploaded to the ATtiny.


Sorry about the shoddy fotography. If I find a decent camera I might upload some nicer images.

This was a fun project and well worth the time :-)


Donnerstag, 1. November 2012

Kickstarter - A recap of my campaign


I recently successfully funded a project of mine via Kickstarter (link: http://www.kickstarter.com/projects/808216251/mediated-touch-a-telepresence-study). People have been curios about how the process went, so I decided to quickly recapitulate my experience. 

First of all, there is lots of stuff on how to run a Kickstarter campagin and stats about Kickstarter out there. I personally found this website the most helpfull while running the campaign: http://www.kicktraq.com/


So lets take a look at my project:

How did it go?




I marked some interesting points on this graph. 
(1) Begin. This was awesome. I basically clicked submit on the Kickstarter page - just because I was curious *if* it would work. And it did. Then I thought "I should send out an e-mail to people, telling them about this". By the time I had finished that thought, I already had my first backer, a former lab-mate. I ended up opting for not spamming my entire e-mail contacts, but selected a few ~ 20 people who I sent a message to, asking them to forward it to people who might be interested. 

Within the first day, I was backed with over 400$, of which 65$ where from people I knew - the rest where strangers to me. This was quite a thrilling experience. I could not really understand it - it was only later that I realized Kickstarter had selected my project as a staff pick:

During the next couple of days, my project was plastered all over (my corner of) Facebook by me, friends, people I study with and, to my surprise, the odd person who was a stranger to me. Also, people continued backing, and very soon, I hit my goal of 950$

After that things started stagnating a bit. Then something even worse happened. I lost money. I was not even aware this could happen. What I learned is, you must not only convince people to back you, you must continously keep them convinced. Loosing backing was quite a blow to my moral. However, I guess its just one of those things which happen and should not be taken too seriously. I never found out why the two people who 'backed out' backed out.

Things changed half way (2). This was a strange day. I don't know if this is random, or if this is significant. It might also explain day one. What happened is this: My Grandmother, Mother and Aunt decided to back my project with 300$. (It was done from one account, so they do not appear as individual backers). Then all of a sudden, 3 more people backed it, with substantial amounts of money. Quite a day, I was really hyper.

However, as with day one, one of the backers rescinded their backing.

I really did not do much in form of marketing. Towards the end of my project (4) I sent a fb message to a couple of friends who I knew would most likely be happy to back my project, asking them to do so, and telling them not to worry about adding a large sum, I really am just interested to see if I can get more backers. Most of them backed it. On the last day (and some even within the last hour) a bunch of friends ended up making the effort to back my project (5). I would guess that I know around 30 of the 100+ people who backed my project in person. About half of those backed it in the last two days.

And then, of course as soon as the backing period was over (6), I got a bunch of messages by people apologizing for missing the time-window. I assume, if I had written to these people in person, they probably would have backed the project as well.


 Here some more statistics from Kicktraq

After a big backer backs out, things look sad:



It can be corrected though:



 Entire course of project, including trend at each day:



What did I learn


This is what I did right
- My project is very unique. I think this contributed to it being featured on Kickstarter. Without being featured, things would have been very different.
- My project was appropriate in scale to my network. Luckely things went well and I did not have to take any extreme measured, however, before starting I sort of considered which networks I have (family, university, former work, friends in Canada, friends in Austria, friends in the Netherlands) and estimated how much backing I could potentially get if I reached all of them. The project I intended to do, and the reach I thought I had aligned nicely, so I figured I might be able to do this.
- The presentation. I think people liked my video and the way I had things set up. I think it was professional enough for people to believe that I can pull off my project, while being honest and personal enough that people felt comfortable giving me money even tough my rewards where not the most tangible ones. (a lot more people than I would have anticipated opted for the "no reward" option.

This is what I did poorly
- My funding goal. After I had almost reached my goal of 950$, I realized that I had actually anticipated to overshoot that goal by ~ 600$. However all of a sudden I found it difficult to explain to people why I needed their backing, even though I already had 100%. The backing also stagnated once I had reached 100%. This was a huge mistake. I did this, as I was planning on doing my project anyway, and even the 950$ would have been valuable, however I learned this: Be bold. Ask for as much money as you need. If you don't ask for the right amount in the first place, it is hard to justify this later on
- The rewards. This was probably the weakest point of my project. I did not know how to do them, as, unlike most Kickstarter projects, I am not designing a product and I am *not* interested in distributing and selling things. Because of that I thought that I need not put so much focus on this. Well, I think now that I was wrong. For example, I ended up receiving additional backing from one person after some exchange, in which I asked him what type of reward he actually would like to see. After I introduced that reward, he almost doubled his pledge. I did this on the last day. For me it all worked out - I got what I needed and am happy with my project. Next project, first thing I will work on will be the rewards.


A word of warning:

Kickstarter does not initially mention, that you will pay additional fees on top of the 5% which Kickstarter keeps. When it does it says Amazon keeps between 3% and 5%. 

What it does not mention however is that Amazon does not apply this percentage equally to all transactions. For the 1$ pledges I ended up paying 11 cent to amazon. So from every 1% pledge I get to keep 0.84$. This is quite hefty in my opinion. From 5$ pledges Amazon keeps between 0.30$ and 0.35$. Thats 6% to 7%.

All in all, I ended up receiving 89% of the total amount pledged. That is, in my opinion, a lot of fees. I am happy paying Kickstarter these fees, as I feel like it was extremely beneficial that I could use their platform  however, I am not sure how I feel about the Amazon fees.


Some links:


I found following blogpost to be extremely interesting  especially interesting:  http://boardgamegeek.com/article/8849498#8849498

More interesting discussion can be found here: 


Samstag, 27. Oktober 2012

Some Data Visualization

My friend Johanna asked me to help her figure out how to visualize some data she was working with.

(Maybe I can get her to update this blog with some actual information on the Data. My Estonian is about as good as my Esperanto or my Inuit, so I know what the labels on the data say, but well. Not what they mean)

She gave me a list of buildings of a district of Talinn. Each building had two datapoints: a) it was classified according to some (to me completely mystical) Estonian system and b) the year it was built in. My first thought was to just to give each classification a value and create a scatter plot:


This initially seemed quite useful. You can see which classifications concern newer buildings, which ones concern older buildings. You can see that very few - well actually, no buildings at all where built after 1940 and before 1945. However, I did not feel like one sees the entire picture. So I decided to add some jitter. Once I saw the result, I decided to add a whole lot more jitter. This is the graph I came up with:


Here we can see a whole lot more detail. For example the third, fourth and fifth category from the top looked fairly similar around the year 200 in the first graph. Here we see that there is actually a lot more going on. I still was not quite satisfied, so I considered it a programming challange and tried to see what I could come up with using processing.


I would have never anticipated the huge spike in the first classification just by looking at the chart I had previously made. I'm not quite sure if the mirrored thing is so smart, as it might make the differences between a large and a small number of occurrences appear to be smaller then it is... still, I think its a pretty graph.

Here is (some of) the code I used:
("some of" because estonian seems to break snippler which I use for the code formatting)


Finally, this is what happened, when i did not use pushMatrix() and popMatrix() correctly. I think its quite a beautiful result:




Dienstag, 2. Oktober 2012

How you can help my Kickstarter campaign



Three things you can do:

- If you could publicly back me, by contributing 1$ that would be A-M-A-Z-I-N-G. I know many of you don't have any more extra money to spare than I do, however, this 1$ means a lot. It shows the world that you are publicly supporting me. Not only by sharing a link, but by contributing what (sadly) seems to be the one thing which counts in this world: $$$. Depending on where I go with this project, demonstrating that I have a broad supporter base may be extremely valuable to me.

- Please criticize what I am doing. Please find the flaws in my reasoning, the fallacies of my ideas. I will post them on the kickstarter page in order to start a discussion, to start discourse. I will learn from your criticism and other will learn from it. There is so much valid criticism to what I do... lots of my ideas are very problematic. I want people to point this out so it can be discussed and analyzed. Science is negotiation, our future is negotiation. The more standpoints we find, the richer my project can become.

- Finally, please share what I am doing. If you know somebody who is interested in this type of thing - tell them about my project. 

Prototype for my Kickstarter Campaign

Hi Everyone

as you might or might not know, I recently launched a kickstarter campaign in order to collect funding for my bachelor thesis. 

Check it out: http://www.kickstarter.com/projects/808216251/mediated-touch-a-telepresence-study

The money will go towards the hardware I require for running my experiment. Part of the hardware will be a humanoid robot with 4 DOF. In the following video you can see a rough prototype of the head, which will be the most complex moving part of the robot:


 
(I had to add music, as my flatmates complained that they did not want to be heard talking in the background. I find Estonian makes for beautiful background sounds... but then again - I have no idea what they where saying :-D....)


I built these prototypes with parts I had around the house. The brackets where freebies which I was presented with by John Iovine from Images Scientific Instruments quite some time ago. (Thanks again, btw!...) 

 *
Here are some pictures of the process:
... the servos and the brackets which I used for mounting them. I'm just getting started.


Continuing to assemble things...


The servos did not hold as tight as I wanted them to - in order to give the whole thing some additional strength I cut thin strips of thermoplastic, heated it up and then wrapped it tightly around the joint. I like this way of attaching things as its quite effortless but super, super stable.


 You also see that I used thermoplastic as shims (or washers? don't know that word. hat to google it). The screws I use are so tiny that finding fitting ones is quite a task - this is again, easyer and better.




Chassis is finished, and firmly mounted on two bottles filled with water for stability:

 


Anyway thats it for now. Lets see how this whole Kickstarter thing goes :-)