Daylight savings time

So, first some background. This weekend the Americans introduced their
DST. Well, not everybody did but most parts of the United States as well
as Canada. This as always quite confusing to the big masses.

Now as a part of my personalized Google search thing, I’ve added the hot
trends application. All in hope that it will some day help me spot the
hot trends on the internet. Which it did this weekend as the Americans
switched to DST ( Otherwise I would have blatantly ignored it ). With no
further delay, I present you the screen shot showing the top 100 search
terms on Google, having no less than 18 related to time :)

href="http://imgs.langly.org/main.php?g2_view=core.DownloadItem&g2_itemId=2125"
rel="lightbox">
src="http://imgs.langly.org/main.php?g2_view=core.DownloadItem&g2_itemId=2125">

3 UPS and the Coffee machine.

So, I feel this one is worth bloging about :) . Yesterday, we had a power
outage at the university. And with no power to drive our computers, the
only sane thing would be to sit and drink coffee. But making coffee
without power is somewhat of a challenge. However, as Ph.D students, we
are expected to solve the unsolvable, and we did.



We first tried with one UPS, but that seemed to fail. We had to bring in
two more to be able to drive the coffee machine, but two UPSs managed to
create 3 coffees ( That is, two rounds of coffee making ). You can see
the final picture here :)



And yes, I know I should clean the cell phone camera. Expect the paper pretty soon, we just have to sort out the
authors list :)

First OGP post

Seeing how I’m lately have grown more and more involved into the href="http://opengraphics.org">OpenGraphics project, I’ve started a
separate blog category for it. For those unaware of the OpenGraphics
project, we’re trying to create an open graphics board. At the moment
we’re close to having the Verilog down for the two main chips, just some
infrastructure and testing left.

And what’s a blog entry about hardware without a screenshot. I still
enjoy watching the RTL Schematics output from ISE, even after a couple
of projects :)





An I2C master I’m working on between writing tests.

Making HTML mails work with Mutt

Well, there’s a lot of people sending HTML mails out there. And it’s starting
to get annoying not being able to read them in our favorite mail client, Mutt.
Now, I know, mails being sent in HTML format are usually not worth reading, but
here’s a quick how-to anyways.

in your .mailcap file put something like this:

text/html;links %s; nametemplate=%s.html
text/html;links -dump %s; nametemplate=%s.html; copiousoutput

Now, somewhere in your .muttrc put this line:

auto_view text/html

and you should be all set to read HTML mail in your favorite mail client.

The GPU Pipeline. ( GPU #1 )

<< Work in progress >>
<< Images to come >>

A couple of weeks ago, I posted a entry about me pondering upon writing
a series of articles on GPU, and topics related to GPUs such as
graphics. This first article will be a gentle introduction to the world
of graphics, trying to give you, the reader, a bird’s overview of the
entire pipeline. But first some general rules about this series of
articles. Unlike others, I won’t go into the trap of saying that it will
not be a lot of math required to understand the GPU. The GPU and 3D
world is based upon mathematical principles, and thus a lot of the
behaviour is best described using mathematics. I believe I shall manage
to steer clear of mathematics in this introduction, but if you seriously
want to learn how the GPU works, I strongly suggest brushing up on your
linear algebra.

BREAK

Don’t panic!

Most modern computers nowadays have a special processor for dealing with
graphics, being either 2D or 3D graphics. The reason why is two-fold,
first it allows the CPU to concentrate on more the more important work
at hand, and secondly it allows a more specialized processor than the
generalized CPU. While today’s CPUs operates at core frequencies around
~4Ghz, GPUs can still beat them at certain tasks operating on a mere
1.4Ghz. This is mainly due to being a highly specialized device, and it
having a lot of simple cores. Well, simple compared to the CPU core.
While this specialization is great for certain domains, e.g. graphics,
it decreases the performance in other fields. To begin understand why, a
fundamental understanding of the graphics pipeline is important.

When a programmer programs a 3D application, he does so by creating a
geometrical object, gives it a place in the world and then applying
texture, before it appears on the monitor. Simplified this gives us 4
steps. Create geometrical object => place it => texture => monitor, and
which is reflected in both the OpenGL and DirectX pipelines. In a more
technical terminology this is called Vertexes => Vertex Shader =>
Fragment Shader => Monitor. This simplified model has left out a
fair share of important details between the different steps, but works
for now.

In order to describe a shape to appear in the scene, the developer sends
the GPU a series of 4-component vectors containing its position, X, Y, Z
and a special H component describing if it is a point. Being a
4-component vector allows us to do more transformations, but this is a
topic to be further discussed in the article on vertex shaders. This
stream of vertexes are so sent to the vertex shader, where they are
multiplied with a 4×4 matrix to give them a position in the view. When
the vertexes are transformed, they are assembled into predetermined
shapes as specified by the programmer. OpenGL and DirectX gives the
programmer 8 different shapes, whereas the rectangle is the most used
one. By specifying a lot of rectangles, it is possible to describe very
complex figures such as planes or overly dimensioned heroines.

< Reread >

When the basic geometric shapes are assembled, they’re sent to a rasterizer.
The rasterizer’s job is to create fragments. It does so by looking at the shape
described by the vertexes, and create a set of fragments/points that might
appear on the screen. Now, I know that this might be confusing if it’s the
first time you read about graphics, but I’ll try to explain the difference
between a fragment and a vertex. Think of the vertexes as a way describing the
corners in a triangle, while fragments are all the possible points inside the
triangle. The points necessary to create the physical manifestation of the
triangle, so to speak. In the figure below you see three vectors describing the
triangle, while fragments actually makes the body of the triangle.



When the rasterizer is done, it sends its fragments to the fragment
shader. The fragment shader, working on the physical manifestation (
remember? ), applies texture to the fragments and other special effects
such as light. When the fragment shader is done, the fragment will be
checked if it overlaps a previous fragment. No point in further
processing a fragment if it is behind an already drawn fragment. (
Usually this step has also been done earlier to reduce the work load. )
If it passes the check, it will finally qualify for a position on the
screen.

Being a quick and dirty introduction to the pipeline, several steps has
been omitted in order to, I believe, make it a better birds view of the
pipeline.

The typical Emacs user

RMS doing the ’supermanning that ho’ dance…

Introduction to GPUs

I’ll start my first post of the year by announcing that I’ll try to
start blogging about GPU and 3D in general. Being a Ph.D student
researching on GPU architecture, I’ll blog about the different trends I
see in the world of graphics, while also having some in-depth articles
about relevant topics in the 3 dimensional world.

All this would naturally be in an attempt to somehow try to organise my
knowledge gained from researching, while also contributing something
back to the community in a less formal and more accessible form than
scientific journals and papers.

The first series of articles I plan to write is a introduction to
the world of 3D, concentrating on basic topics such as textures,
vertexes and the general 3D pipeline. To help illustrate the points
I’ve started writing a simple application using Gtk and GtkGLExt
allowing the user to easily manipulate the ModelView Matrix.





The source of this simple application can be found here:

glMatrix

New Spam filter installed

Two new improvements have been made today. first of all I’ve finally
gotten around to fix the url redirection, so no longer the extremely
long cgi-bin/scriptname.cgi/cat—- url. Secondly, I’ve installed a
akismet plugin in the comment system, so hopefully a lot less spam in
the comments. A quick grep through the logs gave me the following
histogram over rejected comments per hour:
src="http://chart.apis.google.com/chart?chs=400x200&chxt=x,y&cht=bvg&chd=t:2,23,37,32,33,23,23,25,36,22">

First appearance, it seems like an effective solution. It might slow
some of comment posting down, but it doesn’t seem like that’s the major
problem atm.

And as a side note, the histogram is made by Google’s chart api. I’m
waiting for gnuplot with support for histograms to reach ubuntu.

Procationation:

Have to remember putting this one up on the wall when I return
to the office when I return to Murcia in a week :)


This was mostly a entry to check the new lightbox JS script :)

Nice quote


“There are 10^11 stars in the galaxy. That used to be a huge
number. But it’s only a hundred billion. It’s less than the
national deficit! We used to call them astronomical numbers. Now
we should call them economical numbers.”
– Richard Feynman