Thursday, November 10, 2011

A Song Of Ice And Fire

Remember all those endless pages with elvish written songs in the Lord of the Rings books? Well I do, and they were as fun as writting an ethics essay in university (for the record: that was not fun at all)... I didn’t think I could go through that again so when half a year ago a friend of mine gave me "The Talk" about the awesomeness of this "new" book saga called A Song of Ice and Fire, I just unplugged my brain and started picturing old simpsons episodes in my head while nodding in approval.

... and by "old simpsons episodes"
I meant half naked girls with dragons.

Casually, a couple of months later my girlfriend downloaded the HBO Series based on the first book “A Game of Thrones" (Viva la Pirateria!). We watched the series 10 episodes in a week (it would had been a couple of days if we hadn’t had to work). By then I was totally determined to read the five available books whatever the cost... Unfortunately $80 bucks for every book was way out the budget I had for "whatever the cost" so I decided to sacrifice 10 years of blessed good sight by reading them all from the screen of my ipod.

Totally worth it

I can say without doubt that I haven’t seen a story so epic since the Bronze Saints fought in Asgard. Not even Goku turning into a goddamn Super Saiyan or Obi-Wan letting Anakin to die in a river of fucking lava were as emotional and exciting as some chapters, specially from the third book ("A Storm of Swords").

This is you understanding the epicness.

I'm not a book reviewer, I don't even consider myself a devote reader, I'm just a consumer and what I expect from a book is to be well and truly entertaining... and damn it was! Treason, sex, violence, wars everywhere, honor dilemmas, “zombies”, lots of winning quotes and even some dragons!... trust me punks this is like The Expendables of fantasy books! 

There are so many things I could say about this saga... but I really should be doing other important stuff right now. *cough* thesis *cough*, also I think it's better for you to find out that stuff for yourselves.  Meanwhile I'll let you with my favorite lines from the books.

"Those are brave men. Let's go kill them." « Tyrion Lannister (A Clash of Kings)
“There is only one god and his name is Death. And there is only one thing we say to Death: “Not today.” « Syrio Forel. (A Game of Thrones)

“I seldom fling children from towers to improve their health. Yes, I meant for him to die.” « Jaime Lannister. (A Clash of Kings)

"Rhaegar fought valiantly, Rhaegar fought nobly, Rhaegar fought honorably. And Rhaegar died." « Ser Jorah Mormont (A Storm of Swords)
"Don't make me rue the day I raped your mother." « Roose Bolton (A Dance with Dragons)

That's all folks, now read it! I command you!

Friday, October 21, 2011

Dōmo arigatō, Mr. Roboto


"Robotics has always fascinated man, because let's face it, it's awesome to play god... We humans are vain fuckers. "
~ Me on Robotics

Robots are awesome, don't let anyone tell you otherwise, from evil science fiction police robots to awesome real robots that rock all day long, robotics is full of winning. I dare you name one lame robot in  history... ok, C3PO sucked ass but hey, even him could speak 6 million languages.

"woo arrrr moo ar gah" (that's "fuck you" in wookie)

Truth is that we were born too soon and we won't live long enough to see robots like C3PO saving any galaxy. However, we have pretty impressive machines right now, like robots that wonder in other planets just like you do in your living room, or creepy robotic hands that cut you open and play with your insides.

"Yep,  straight out of your favorite horror movie"

Sadly, robotics is not all beer and strippers, sometimes robots can be as fun as a handbag full of snakes. For instance: isn't frustrating when yor are at your first robotics class and can't even find a robot's location from a camera point of view?... Well, maybe not, but in case you're reading this, you probably ended up here googling how to resolve that tricky stuff.
 
Let's get started

First, it's very common in robotics to use two or more coordinate frames to solve a problem. Industrial robots for example, use cartesian coordinates (height, width and depth) to move an object across the space.

Now, let's say you have a camera looking to a robot's 3 dimensional workspace from above (there you have the camera axis and the robot's axis) and you want the robot to move to a certain point in the workspace knowing only the point coordinates from the camera's point of view.

Yes, this blog can get serious sometimes.

Of course, you'll need to transform these "camera coordinates" into the coordinates from the point of view of the robot... damn how to do that? Simple, you use a type of transformation matrix called Perspective Matrix.

 

We will need at least 3 known points from both the robot and the camera points of view to be able to resolve the system. Suppose Robot coordinates are (Xr1,Yr1,Zr1), (Xr2,Yr2,Zr2) and (Xr3,Yr3,Zr3) and camera are (Xc1,Yc1), (Xc2,Yc2) and (Xc3,Yc3). We should get  a set of nine equations with nine variables (our perspective matrix).

(a*Xr1) + (b*,Yr1) + (c*Zr1)  = Xc1
(d*Xr1) + (e*,Yr1) + (f*Zr1)  = Yc1
(g*Xr1) + (h*,Yr1) + (i*Zr1)  = 1

(a*Xr2) + (b*,Yr2) + (c*Zr2)  = Xc2
(d*Xr2) + (e*,Yr2) + (f*Zr2)  = Yc2
(g*Xr2) + (h*,Yr2) + (i*Zr2)  = 1

(a*Xr3) + (b*,Yr3) + (c*Zr3)  = Xc3
(d*Xr3) + (e*,Yr3) + (f*Zr3)  = Yc3
(g*Xr3) + (h*,Yr3) + (i*Zr3)  = 1

Resolve this system and there you go... you have your Perspective Matrix

Once obtained the values ​​of the perspective matrix, it is easy to do conversions by multiplying the robot coordinates by the perspective matrix to obtain camera coordinates. Or the camera coordinates for the  the inverse of the perspective matrix to obtain robot coordinates.


I hope this helps some tormented soul someday... cheers.

Hey baby, wanna kill all humans?
To  know more:
      - Introduction to Homogeneous Transformations & Robot Kinematics

Wednesday, September 28, 2011

Rivalries


Lisa, certain differences, rivalries if you will… have come between us. I thought we could talk it over like civilized people but instead I just ripped the head of Mr Hunny Bunny.