Kyle Lahnakoski

Just One More Layer of Indirection
(Trying to achieve stable orbit with sufficient architecture)

Archive for the ‘Physics’ Category

Gamma Correction

Thursday, February 25th, 2010

I have long desired an awesome colour wheel from which to select the colours for my palette.  I am not looking for a beautiful human-selected palette; I am looking for a purely mathematically based palette that looks great too.  I have noticed that the yellows and browns, in software palettes, are a tiny slice of any mechanically generated palette.

Let’s begin with my problem.  I am trying to transition from green to yellow by adding red:

The problem

I can not be certain what you see, but I see green, green, green, green, maybe lighter green, and then a transition to yellow.  This is a poor start to making a good colour wheel.  It seemed to me that the high-intensity green was overwhelming the small amounts of red.  I wanted some way to boost the low reds so I would get a better range of lime greens.  I knew intensity was a “logarithmic” scale, and I was hoping compensating for the “logarithmic error” would help with this problem.

I was wandering the web when I found Eric Brasseur needed to compensate for gamma error in picture scaling.   Could his solution be what I was looking for?

This time I used dithering to mix my colours and make the transition from green to yellow.  If I can see past the graininess of the colour swabs, I can see if this transition was better.

The test

I definitely get more yellows, and the uniform green has been removed.

Using Eric Brasseur’s gamma error correction to blend colours, I get:

The solution

Excellent!

I should point out that this is not actually Eric’s gamma correction, just that he was the one that brought it to my attention. Apparently, the gamma curve for consumer monitors is well defined. See Wikipedia on the sRGB standard

Now the three all together:

The solution - together

From top to bottom we have the gamma corrected blend, the dither blend, and the original “linear” blend.

The following has blends of eqi-intensity.  Bright yellow, as shown in the above palettes, has double the brightness of the green, so it is not a very good test for gamma error correction, and does not belong here.

Comparison RGB

Click on image to view at full size. The reduced size shown blends the dithering improperly.

Again, from top to bottom, we have the gamma corrected blend, the dither blend, and the original “linear” blend.

If you do not see the top row and middle row as the same, you should calibrate the gamma of your monitor.  I find these two images much better for calibrating gamma than the black-and-white lines (or RGB lines) used in most other gamma calibration images.

Finally, a mathematically based colour wheel:

Colour Wheel

3D TV is NOT Bad For You

Thursday, February 11th, 2010

Some guy named Mark Pesce wants to prevent me from seeing Avatar in my home, in 3D. He claims heavy use of 3D monitors will result in “binocular dysphoria”, and television manufactures should perform health and safety testing.

Well, I say “Bah! Give me Avatar, and forget the health testing!”.

Using the Wikipedia article on depth perception, he claims we humans use 9 different depth perception cues we use to determine depth. Upon reading the Wikipedia I found only two that are relevant to 3D screens and monitors. They are called “Accommodation” and “Motion Parallax”.

Accommodation is where you can feel the depth at which you focus at, and you can use that to determine depth. I believe humans are not really sensitive to this feedback, and only able to use it when items are really close to the eye. For example, have you looked at a repeating pattern, such as a screen, or wall paper, or fence rails, and seen it closer, or farther, then it really was? Accommodation did not help you.

What did help you determine proper depth was motion parallax. This is mentioned in the Wikipedia article, but not emphasized as I would like. I believe we humans are very sensitive to motion parallax. Combined with the fact we are fidgety creatures, we can see depth with only one lens because that lens is always getting a new perspective. When we watch 3D screens we do not get motion parallax feedback, and the association between inner ear and motion parallax (or lack of it) must be ignored by the brain.

But I believe the human mind is much more powerful than Mr Pesce gives it credit for. I may concede that old people may not be able to transition between real-life 3D and projected 3D, but I have no doubt younger minds will be able to switch, even if this switch will have to be conscious.

In summary: I want to watch Avatar in 3D.

Cronic Radiation is Good?

Monday, September 21st, 2009

My guess is that the human body generates vitamin D from the radiation.

http://www.scienceboard.net/community/perspectives.122.html

The Pentatonic is Not Fundamental

Monday, August 10th, 2009

One of my favorite blogs, Good Math, Bad Math by Mark Chu-Carroll, has a short post on how fundamental the pentatonic scale is.

I am mildly disappointed with how Chu-Carroll, and many others, think it is amazing that the human mind is able to distinguish the 2/3 note ratio. If you watch the video on Chu-Carroll’s blog: The guy dances on stage as if he is jumping on the keys of a giant piano. He sings the first two notes (with a ratio of 3/2) to the audience. When the guy jumps on the next key up the scale, the audience sings back the third note without his help. The audience knows this third note is another 3/2 up the scale. There is nothing magical about the 2/3 ratio. The guy could do the same with 1/2 note ratios (whole octaves) with the same success, and maybe even the 5/4 ratio with the same success. (Maybe the latter with less success, but only because the notes are getting closer together and are harder for the audience to sing).

I consider the 1/2 ratio “fundamental”, so fundamental that it is given the name “octave”, and all equal temperament scales have been made to align to the octave.

Coming Soon: Equation of the Universe

Friday, April 3rd, 2009

Those that know me for a long time know I am “working” :) on the Equation of the Universe. Way back in high school, I thought the equation of the universe as a single, relatively simple, equation that describes the position of all matter in the universe for all time. The apparent complexity of the universe is actually a result of the fractal nature of the equation. The universe’s fractal nature can be seen in the similarities between the very big (planets) and very small (atoms). But like a fractal, “similar” does not mean “same”.

It would be awesome to have a simple equation you could run though your computer to view the past (assuming you could find the coordinates of earth), or explore distant civilized worlds. Once I started university, I quickly learnt that God would not be so kind to allow such an equation to exist.

So, instead, I believe the universe is directed by a fractal equation that has a locality component. The fractal is not strictly local: I have no problem with distant parts of the universe interacting as if quantum entangled. But it is this locality component is what gives rise to both the dimensions of space, and our observance of time. Finding the equation may not be easy. Like any good fractal, it’s effects may not portray the underlying simple equation: We may have to test trillions of candidates to see which matches observed phenomena.

It is the Equation of the Universe that drove me to take Pure Math, with Physics, Quantum Mechanics and Statistics as electives. When I saw the complexity of logic required for just the simplest results, I knew my brain would not be able to find The Equation directly. This lead me to computers: hopefully I could build a machine that could work on the solution! I took AI in my final year, and concluded the state of computer science is not even close to providing the solution I need.

Disappointment: There is no chance I am going to find The Equation.

Many years pass.

Elation!! The other day I see that someone else shares my “vision”: A truly enlightened individual for sure! Not only that, he may have the smarts to find it directly!

Go Tim Palmer!!

kyle@arcavia.com