Why computer coordinates start from the upper left corner

When I first studied graphics programming, I was traumatized that the coordinate system on a computer’s screen is upside down. The positive x-axis starts on the far left and points to the right as normal coordinates should do, but the y-axis has its 0 at the top of the screen and nosedives straight down to hell from there. Imagine that you have all your graphics worked out beautifully on paper, and then when you try to program it in a computer, you have to flip all the figures and re-calculate all the coordinates. Why can’t computer scientists be normal for once and respect the centuries-old Math? Cartesian coordinates were invented in the 17th century, while the first electronic general-purpose computer (ENIAC) didn’t come out until 1946.

Continue reading “Why computer coordinates start from the upper left corner”

Advertisement
Why computer coordinates start from the upper left corner

Translating MATLAB to C code

As a low level research assistant in a lab, I have recently been assigned the task of translating a chunk of MATLAB code to C. When I contacted my brother for guidance, he looked at me blankly: “Why? Who does that?” I never thought code translation was a thing. Why don’t people just write their programs in their desired language from the beginning? Why must they come up with new ways to torture these poor research assistants? Warning: this post contains some nerdy information that you shouldn’t be concerning yourself with unless you unfortunately have to.

Continue reading “Translating MATLAB to C code”

Translating MATLAB to C code