Tuesday, May 16, 2017

What is the opposite of yellow?

There is a controversy about complementary colors!
Will the most complimentary color please stand up!

I watched an interesting YouTube video the other day that answered the question that has been foremost in the hearts and minds of Americans these days: "Why Are So Many Popular Cartoon Characters YELLOW?"


Channel Frederator (that's the name of the guy in the video, or something like that) gave a very entertaining answer to this question. I won't spoil it for you. I will let you watch the video to find the answer.

The complement of yellow is purple

I want to zoom in on the explanation of complementary colors. Frederator first showed the artist's color wheel. This wheel is designed around the color system that I learned about in kindergarten... when I wasn't chasing Tammy around the playground. 

The artist's color system is based on the set of artist's primaries: red, blue, and yellow. Someday, I will write a blog post that totally destroys this silly notion about this silly set of primaries, but for the time being, let's just accept these as a hymn from the gospel choir with shouts of Alleluia! coming from the congregation. Here is an actual screenshot from the video, defaced with some childish scrawling from me.


Artist's color wheel, showing purple opposite yellow

So, yellow's complementary color on this wheel is purple. Or, to put it in the words of Frederator, "So, yellow's complementary color on this wheel is purple." (At the 2:45 mark in the video.)

The complement of yellow is blue

Now the controversy starts. Frederator then describes a second color wheel, based on another set of color primaries. In this view of the colorverse, the complement of yellow is blue! This is just too much for my simplistic brain to hang on to!!


RGB color wheel, showing blue opposite yellow

***** Pause for public service announcement *****

Would you like to be informed of new John the Math Guy blog posts? Send me an email to let me know that you want to join the cool group of people on my mailing list!  John@JohnTheMathGuy.com.

***** End of public service announcement ********

The complement of yellow is purple blue

I wish it stopped there. Albert Munsell, the father of Color Science, developed his own color system something over 100 years ago. His color system is three-dimensional, however the following image shows just a slice of it. The illustration below is unrepentantly stolen from the Munsell website. Again, I scribbled on it with my Photoshop equivalent to crayons.

Munsell color wheel

In the Munsell system, the complement to yellow, which Munsell euphoniously named Y. The complement of Y was neither purple nor blue, but PB. I am not sure whether PB stands for peanut butter or purple-blue. I will have to ask him next time I bump into him.

You might say that Munsell found a compromise between these two warring factions. That might not have been his reason for spending the majority of his adult life researching color and inventing the Munsell Color Tree, but this is indeed a compromise. My wife tells me that she knew this all along. The complement of yellow is either blue or lavender / purple. I wish she woulda told me before I wasted all that time on the blog!

The complement of yellow is blue

Now, let's get into some more recent science. Munsell did some scientifical stuff -- I am not suggesting otherwise -- but there has been some progress in organizing crayons since then. Here is an attractive diagram that shows a color wheel based on the CIELAB color space.

Dieser CIELAB-Farbkreis zeigt für ΔHue=10 die jeweils
in CMYK erreichbare höchste Chromazität.

I need to back up just a bit. The CIELAB color space became an official standard in 1976. It is based on a long line of work that started with Munsell, but included the work of many luminaries in the field of color: MacAdams, Adams, Nickerson, Hunter, and Glasser. From a qualitative standpoint, the CIELAB color space looks a great deal like the Munsell color space. Today, CIELAB is defined in the ISO standard CIE 15:2004, and has been chosen as the official color space of the 2018 Olympics. So, it is considered good science.

From a casual glance at the preceding diagram (the one with the German caption which I clearly never bothered to translate), it's apparent that the color directly opposite yellow is a shade of blue. It would seem that Munsell's compromise got lost somewhere.

But, I am cautious in drawing this conclusion. First, the diagram looks real slick, but how do I know that it's correct? This is especially important since the interpretation of RGB colors in an image is up for interpretation. Without a color managed workflow, we can't know that the color that shows up on my computer monitor is the same as the one that showed up on the computer monitor of the person who created that slick graphic. To add to the ambiguity, who's to say that my perception of blue is correct? My wife would certainly argue otherwise. Call her up. She would be glad to tell you that I am wrong about virtually everything.

(Comment from my wife: Except for the fact that I was right to marry her--she's actually quite ecstatic about that.)

I just happen to have a previous blog post about color naming that could provide a more meaningful answer. In this blog post, I congealed a bunch of data about the CIELAB values of a variety of fundamental colors. I repeat the fabulous diagram below.

The fabulous diagram that was referred to in the text

Based on the above diagram, which gives CIELAB ranges for some basic color names, the CIELAB answer to the question of what is the complement of  yellow is blue. 

So, what-people-would-call-blue is the complement of what-people-would-call-yellow

Did I say purple blue? I meant blue

Did Munsell really mean "purple blue"?

There is something of a bridge that connects the Munsell color space to CIELAB. This bridge is called the Munsell Renotation Data. This is a table of 2,729 colors, where each color is expressed using the Munsell notation and in CIELAB values. These values can be used to test whether the Munsell and the CIELAB answers to the question of complementary colors are consistent.

I selected all the entries in the renotation data that have a hue of 5Y. This hue designation is in the center of the yellow group of hues. They have an average CIELAB hue value of 98.3. There was a bit of variation, so I also looked at just the most saturated colors in the 5Y family. If I select only those colors of high chroma, the average CIELAB hue is 93.7. Where does this put the complement? These hue values are in degrees, so this would put the complement of yellow at a CIELAB hue of -81.7 or -86.2. I did the same computation for the PB5 section of the table. I got CIELAB hues of -86.8 and -82.2.

My conclusion is that Munsell and CIELAB are basically in agreement as to the complement of yellow. It's blue, ok? The only odd thing is that Munsell seemed to think that it should be called purple blue. Something else I need to talk with him about the next time we have a beer together.

The complement of yellow is yet to be decided

Ok... how about two more approaches to answering the question? Both start with another question.

Q: What is the complement of yellow?

A: What do you mean by "complement"?

Why didn't I think before to question the question? 

One answer to the second question is that complementary colors means that the two colors look good together. That's a kinda fuzzy definition. How can I make that definition a bit more solid?

I could perform a huge psychometric experiment to answer this question. I would recruit a bunch of volunteers and ask them to tell me which of the three colors below (purple, purple blue, or blue) go better with the yellow. 

Which shade goes better with yellow?

So I'm recruiting you. Since you made it this far in the blog post, I assume you may actually have an interest in the topic. Which of the three shades go better with yellow? Answer in the comments below. (Note that I moderate the comments, since there is a fair amount of spam. Please don't get upset if your vote doesn't show up for a day or two.) I readily admit that the answer likely depends on the characteristics of your computer monitor and viewing conditions, but... baby steps.

The complement of yellow is bluish purple blue

I present another answer to the secondary question about what complementary color means. But first let me show you an optical illusion I just created. I'm pretty excited about it, so I just had to show someone.

Please take a moment to find the star in the image below. Once you have identified the star, please find the black dot within the star. Stare at the black dot in the middle of the star for ten or twenty seconds, and then look at one of the other three black dots. I find this works best with the room lights darkened, with a glass of a full-bodied red wine in hand, and with some Gato Barbieri playing softly in the background. The presence of a full-bodied person of your prefered gender is recommended, but not required.


When you avert your eyes to one of the other dots, you will see an afterimage of the yellow star, but it won't be yellow anymore. I added some white space below the black dot so you can better assess the color of the afterimage, and to compare it to one of the three afterimage colors. It will likely come close to matching the hue of one of the three background colors. For me, the afterimage star was somewhere between the hue of the purple blue and the blue background.

For my wife, the experience was a little different. She says: Doesn’t the color of the star vary depending on which background color you look at? When I looked at purple it was slightly darker than the purple and when I looked at blue it was slightly darker than the blue. Just saying. 

She's right, but she missed something really subtle in what I said. I used the word hue, and not color. In my silly little manner, I just assumed that everyone would know that I was talking about the more technical definition of hue, which is roughly speaking, the position on the color wheel. Pink, red, and brick red are different colors but have more or less the same hue.

Now try a variation on this. Take another sip of the Malbec, and stare at the star for another ten or twenty seconds. Then avert your eye slightly to look at one of the tips of the star. The purple or blue afterimage star will follow your eye for a moment, until it fades. Hang onto this thought while I transition into the next section.

Seymour's hypothesis of complementary colors

Here's my own explanation for the phenomena of complementary colors. Maybe this explanation has been articulated elsewhere - I don't know. It didn't occur to me until I was writing this blog post. If one of my readers has seen this explanation somewhere else, I would be happy to hear about it.

Thomas the Tank Engine demonstrates saccades

Our eyes are always moving around, even when we are not consciously moving them. This is known as saccades. Because of saccades, we are always seeing these afterimages. Generally, we are not consciously aware of them, but I hypothesize that they may interfere with our perception of adjacent colors. If the afterimage has a significantly different hue than the adjacent object underneath, then the edges of an adjacent object will change hue whenever our eye wiggles around. 

This constantly shifting hue will subliminally interfere with our ability to parse out the various parts of the image. If the afterimage has more or less the same hue as adjacent colors, then there is no interference, and we see harmony.

That's my hypothesis, anyway. I welcome comments, unless the comments are negative.

What causes an afterimage?

(Warning: The following material contains references to scientifical stuff, and hence may not be suitable for all readers.)

Now for the psychofizziks behind the afterimage effect. 

When we see something, photons are captured by photoreceptors in the eye, putting the photoreceptor cells in an excited state. The excitement in the cells triggers a reaction that results in a nerve impulse. I see the light! But, photoreceptors being what they are, it takes a little while for them to settle back down. They sit out on the sidelines for a bit before getting ready to capture the next photon.

A wideband photoreceiver who can't wait to get back into the game

BTW - I used a football analogy to explain what the photoreceptor is doing. In actuality, though, the analogy (much like everything else about football) is exactly backwards. The photoreceptor doesn't sit on the sidelines to recharge, but rather to discharge. Catching the photon gave it more energy, and that energy has to be dissipated before the next cycle can begin.

When a single photoreceptor is on the sidelines, we can still see because there are plenty other neighboring photoreceptors to catch photons. But each photoreceptor that is sitting out increases the probability that a photon can pass unnoticed. So, as more and more photoreceptors are sitting on the sidelines (i.e. when there is a lot of light), the eye becomes relatively less sensitive to photons.

This effect happens independently for the L, M, and S photoreceptors. (These represent the long, medium, and short wavelength cones in the eye, roughly relating to red, green, and blue light.) For example, the L and M photoreceptors may have a relatively large proportion of photoreceptors on the sidelines, while the S photoreceptors are pretty much all in the game. This isn't a random example, this is what happens when we see yellow.

[The previous paragraph was corrected from the original. Thanks, Max, for finding my whoops!]

When we shift the eye so that those photoreceptors are now seeing white, the S photoreceptors that were seeing yellow are very sensitive to the incoming blue photons, so there is a blue signal. This is true until the blue photoreceptors have reached equilibrium. The L and S photoreceptors who were seeing yellow have already adapted, so they are relatively less sensitive to photons in their part of the rainbow.

(Literally as I write this, I got an email telling me that an old buddy of mine just published a paper with some of his buddies entitled "The constancy of colored after-images". Naturally, I didn't actually read the whole thing, but the authors apparently argue that the brain has something to do with the afterimage effect.  

The complement of yellow could be blue or purple

The chromaticity chart can be used to predict the color (or at least the hue) of an afterimage color. We start by looking at yellow-- the start of the arrow on the diagram. When we look at white, represented by the black dot in the diagram, we have effectively added in some of "the opposite of yellow, so the hue we see is directly opposite of the hue of yellow. This diagram gives us an answer to the question of "what is the complement of yellow?" From the diagram, we can see that it's blue. Case closed. Blue is the unequivocal complement of yellow.

Chromaticity diagram, adapted from this site

But now it gets fun! Notice that the answer depends on where the white point is. The following chromaticity diagram shows that a cool white point (I show 55K, which is where my computer monitor is set) gives us a complement of yellow that is blue. The diagram also shows what happens if the white point is  warmer, as from an incandescent bulb. In this case, the complement of yellow is decidedly purple. I don't think this has ever been said before: The complement of yellow depends on the white point.

The complement of yellow can be either blue or purple

I have made a strong and possibly controversial statement. I put it in italics and copied it as the caption for the above image just to make sure everyone realizes just how important the statement is. But I have a little secret just between you, Dear Reader, and me. I'm not sure I fully believe what I said! 

Tuesday, May 2, 2017

Scatology and lug nuts

You know, I haven't done a long meandering, stream-of-consciousness kind of blog in a while. How about I start off by talking about poop? After all, everyone likes scatology. 

Scatology

There was a study published this past week in the ironically named journal Soft Matter entitled "Hydrodynamics of defecation". Now that caught my attention. And another thing that really cemented my attention was this quote from the abstract:

Despite the length of rectum ranging from 4 to 40 cm,
mammals from cats to elephants
defecate within a nearly constant duration of 12 ± 7 seconds (N=23). 

Wow. My first reaction was: "Well, none of them have cell phones or tablets!" The article went right down into the bowels of the physics that makes this happen. The findings are really quite unexpected. I mean, elephant dung is ejected at an astounding 0.075 MPH, but mouse dung is only going 0.0075 MPH. They explained the lack of variation on the stopwatch by saying that it was all about mucus. Larger animals have a longer transit system, but also have a lot more mucus to keep the trains moving.

I have 12 seconds to answer the age-old question

But my thoughts went more to "why"? As in, "why would Evolution design elephants to have more mucus?" Of course, that reminded me of another article about animals pooping that I read recently. A vet was asked about why dogs look at their owner when they poop. The explanation given by this vet is that animals are vulnerable when they assume the poopsition. They look to their pack mate (that is, you) in order to be alerted about danger.

So, my explanation is that animals are designed to fit the 12 second rule so as to avoid becoming some other animal's poop.

Pit stop

I started wondering... what else takes 12 seconds? My wife gave me a flippant answer about certain quick activities, but her answer was a bit embarrassing. So I went to Google to find a different answer. Here is an interesting factoid: animals and NASCAR drivers require a 12 second pit stop.

The pressure is intense when you're up against a bear in the woods!

Here is a quote from Greg Morin, who is the coach for a whole passel of pit crews:

Our goal is to hit a 12-second pit stop,
hit five lug nuts off, five lug nuts on (on each wheel) ...
get it full of fuel and ship it down pit road.

Left-handed lug nuts

Which brings me around to lug nuts. Here is a very interesting factoid about lug nuts. Back in the 1960's and into the early 1970's, the wheels on a car were held on with nuts with both left- and right-handed threads. Again, why did Evolution create such a silly design?

Keeping you regular since 1897

I found the answer in a well-written blog post on the MoparMax website entitled "The Mystery of Left-Hand Lug Nuts". The writer of this blog has the clever idea to use clever humor to engage histreader. Wow. I wish I'd thoughta that!

Anyway, here's the backstory. 

When a car is moving forward, the wheels on the right side (passenger side in the U.S.) will rotate clockwise. The wheels on the left side (driver side) will rotate counter-clockwise. When I first articulated that sentence my dog said "Huh? How can they be rotating in different directions?"

I went to the garage to look at my car and it hit me. Not the car, I mean the explanation hit me. The wheels rotate in the same direction, but your point of view changes. If I stand on the driver side and look at the front wheel, and then go on the other side and look at the other front wheel, I actually turn around 180°. Factoid: If you look at a clock from behind, it is running counter-clockwise. Words to live by.

When you accelerate a car, there is a torque applied to the lug nuts because of momentum; a clockwise torque on the passenger side, and a counter-clockwise torque on the driver side. If that torque actually makes the lug nut move with respect to the bolt, then it will tighten the passenger side lug nuts and loosen the driver side ones. Yikes! That don't sound so good.

In 1965, a non-profit firm by the name of the Motor Vehicle Research Center did the seminal study on lug nuts. (No pun intended.) (Well, maybe it was intended.) They hand-tightened some lug nuts and did a little test driving. They found that the lug nuts on the driver side were loosened during the test drive, and eventually fell off. Note that the nuts hand-tightened the nuts.

Whoops

Chrysler, Buick, Oldsmobile, and Pontiac all caught wind of the nutty story and bolted to make a design change. Reverse threaded driver side lug nuts became all the rage from 1955 to 1961.

But they don't do that no more. Why did they change? It's about a little thing called stiction. This is like friction, only it's a frictive force between two objects in contact that makes them resist moving until the force is big enough to overcome the stiction. If I have a book on a table, and I lift one side of the table, the book is initially not inclined to move. As I further incline the table, the book will eventually slide down and drop on my foot. I will say "ouch", which is an equal and opposite reaction, just as Newton would predict.

But the book initially not sliding runs counter to one of Newton's other laws, the "force equals mass times acceleration" law. The book should move a tiny bit when the table is slightly inclined. But stiction is a little thing that lives in the world of non-linear mechanics.

And speaking of mechanics, how do they make use of stiction? They tighten lugs nuts to 20 pounds of torque. That's enough to overcome the torque applied when we accelerate. If they promise to always give 20 pounds of torque, we can let them have all the lugs nuts threaded the same way.

Nuts who are left handed

One of my favorite words is sinistral, right up there with non-eucentric, defenestration, and funicular. Not surprisingly, one of my favorite sentences is "The sinistral man non-eucentrically defenestrated his friend from the funicular." More words to live by.

Sinister, sinistral -- Be careful to use the correct word

Sinstral has a dual meaning. First off, it means left-handed. But did you notice that the word sounds a lot like sinister? That's not a fluke. (Cuz a fluke is something that you don't want to have in your liver.) The two words have the same etymology. From the Online Etymology Dictionary entry on sinister we have this quote: 

Old French senestre, sinistre "contrary, false; unfavorable; to the left" (14c.)

Here we see the mixed meanings. There is an implication that left-handedness runs contrary to the normal order of things. And that left-handed people take too long in the bathroom.

The opposite of sinistral is dextral, or right-handed. Not surprisingly, the word dexterity comes from the same root as dextral. I mean, most people are more adept at tightening lug nuts with their right hand.

The sweet truth

Another word that shares a root with dextral is the word dextrose.

First let me say this. The end of the word (-ose) generally signifies sugar. The sugar in fruit is call ed fructose. The sugar in milk is called lactose. The sugar in malt is called maltose. And the sugar in french fries is called potat-ose. (Pause for groan...)

The Elmer's sauce really holds this gluecumber sandwich together -
an excellent source of glucose!

So dextrose is a sugar. What's with the prefix "dextro-"? It turns out that dextrose polarizes light to the right.

Dextrose, and other sugars really got a bad rap. My doctor tells me that sugar is associated with obesity, diabetes, and ants invading picnics. That's just silly. I have never witnessed an ant going into a diabetic coma at one of my picnics. I won't mention the behavior of any of my aunts at picnics.

High fructose corn syrup has gotten an especially bad rap. We find roughly 400 ounces of HFC in every 12 oz can of Coke. And it is really, really bad. Everyone knows that. It's all calories - no protein or fiber or nutrients. And it really messes with all that insulin stuff going on in our bodies.

(BS warning) But, don't believe any of that stuff. That's just fake science that is funded by the Aspartame Supplier Society. (BS warning) A lot of self-appointed health gurus are advocating that we should use "healthy sugars". While the sucrose that I shovel onto my Sugar Pops every morning may not be all that healthy, that sugar is highly refined. (BS warning) We know that anything that's refined has gotta be bad. The self-appointed health gurus tell us that unrefined sugars are actually good for us, since they contain nutrients. (BS warning) Thus, we should be drinking stuff with agave juice and baking stuff with honey. 

(Returning to my normal BS-free blog style) Honey, agave, turbinado, coconut palm sugar... these all have a minuscule amount of nutrients. But none of them are anywhere near being a health food. All of them are a zillion percent sugar, and too much sugar isn't good for you.

How about molasses?



There are a number of self-appointed health gurus who tout the benefit of molasses:

This is a link to a BS self-appointed guru site
Absolute claptrap on blackstrap
More advice for gullible people

Molasses had it's zenith as a health food with the book Look Younger; Live Longer, in which Gayelord Hauser promised us another five years of youthful life if we eat molasses. Here is a list of all the wonderful claims in the book, as recited in an FDA court case of 1951:

\

The court case? It seems a health food store was shipped a package containing jars of Plantation brand molasses along with copies of Hauser's book. The book specifically endorsed Plantation molasses. The health food store displayed them together in their window, and used the book to help sell customers molasses. The court found that this constituted misbranding of the molasses. They held that bringing the book and the molasses together constituted labeling of the product, and that the claims were just plain stupid.

Interesting point though... Hauser didn't lose the case, the health food store was on trial. Freedom of speech allows Hauser to sell books with flat-out lies and preposterous health claims, but one cannot be so free when labeling products.

Don't get me wrong—blackstrap molasses does have significant amounts of calcium, iron, magnesium, and vitamin B6. But it has no fiber, no fat, and no protein. And it's 75% sugar. If you like the strong flavor, go ahead and indulge. But it's better to look toward yogurt, kale, broccoli, salmon, beans, whole grains, fruits, nuts, bananas, and poultry to get these nutrients.

Here is a YouTube video of some celebs of the time, poking fun at the whole "natural foods" movement:



Coming full circle

I should mention one of the audacious claims by one of the audacious websites pushing audacious health food remedies:

Blackstrap molasses has been
a sweet savior for more than a few sufferers of constipation,
be it chronic or occasional. 

I guess if you get enough molasses in your diet, you can get your pooping down to 12 seconds.