Thursday, October 25, 2007

Bresenham's Algorithm

Do you want to draw line segments at the speed of light? Just use Bresenham's Algorithm:

void bresenham(x1,y1,x2,y2)
int x1,y2,x2,y2
{
int dx,dy,i,e;
int incx,incy,inc1,inc2;
int x,y;
int locx,locy;

dx = x2-x1;
dy = y2-y1;
if(dx < 0) dx = -dx;
if(dy < 0) dy = -dy;
incx = 1;
if(x2 < x1) incx = -1;
incy = 1;
if(y2 < y1) incy = -1;
x = x1;
y = y1;
if(dx > dy)
locx = x;
locy = y;
set_pixel(locx,locy);
e = 2*dy - dx;
inc1 = 2*(dy-dx);
inc2 = 2*dy;
for(i = 0 ; i < dx ; i++)
{
if(e >= 0)
{
y += incy;
e += inc1;
}
else e += inc2;
x += incx;
locx = x;
locy = y;
set_pixel(locx,locy);
}
}
else
{
locx = x;
locy = y;
set_pixel(locx,locy);
e = 2*dx - dy;
inc1 = 2*(dx-dy);
inc2 = 2*dx;
for(i = 0 ; i < dy ; i++)
{
if(e>=0)
{
x += incx;
e += inc1;
}
else e += inc2;
y = += incy;
locx = x;
locy = y;
set_pixel(locx,locy);
}

}
}

Monday, October 22, 2007

From 1.0 to Vista, all Windows bootup sounds and screens

Friday, October 19, 2007

The power of SLAM

I've found a couple of amazing videos showing what you can achieve using SLAM techniques. Enjoy!!!



Using SLAM planes are discoverder, and also the actual movements and orientation of the camera, so when a Toy is introduced in the scene its look is adapted to the point of view automatically, simply amazing.



This second video shows the same technique, but visually is less atractive. Anyway the posibilities of such a method are huge, from videogaming to all kind of augmented reality purposes.

See you.

Labels:

Tuesday, October 16, 2007

More FastSLAM II

More FastSLAM

I'm sorry but this is part of my final year project, and I'm really proud of it, so enjoy these wonderfull maps :)

Labels:

Friday, October 05, 2007

50 year exploring the Space

Humankind has reached 50 years of Space Exploration. I haven't been born when all this amazing adveture began, but luckily I've seen many of it's achievments. I wish I'll be still alive when the firts man leave his footprints on Mars. through my 31 years on Earth I've been spectator of the Challenger disaster, the born of the Hubble telescope, the Voyager pass trhough Jupiter and Saturn and the magic story of Oportunity and Spirit in Marts(A three martian months mission that is still alive after 3 earth YEARS), between many other great challenges reached.





Thursday, October 04, 2007

Breathe in Breathe Out Grey's Anatomy

Wednesday, October 03, 2007

FastSLAM Video

It's raining in the Canary Islands