Archive for the ‘Missives’ Category

Reflected Primary Colors

Monday, May 16th, 2022

Eyes are interesting things. We have color receptors in our eyes tuned for three different wavelengths. Short (blue), medium (green), and long (red). Our brains combine this information and allow us to perceive millions of color, which is really just amazing.

These three colors are so important, that we specifically target them when we produce images on our monitors and TVs. All the images are made up of these three colors. Just as importantly, when we capture images with cameras, we actually filter the light going into the cameras into the three primary colors.

Camera image sensors aren’t inherently color sensitive. Each pixel we get out of a camera is actually made up from information gathered from 4 sub-pixels on the digital camera sensor. Each sub pixel has a filter in front of it for light to pass through; 1 Red, 1 blue, and 2 green. This is called the Bayer Filter. After the camera takes a picture or records a frame, the sub pixels get interpolated together to give a single pixel of data.

(It’s probably more nuanced than that, but that is the general idea)

I recently purchased an RGB flashlight, and wondered how well I could reconstruct a color image by taking 3 photos illuminated with the different lights and combining them.

Ideally, I would like to try this using a black and white film camera, or black and white digital sensor, however I have access to neither, so I decided to use my iPhone.

The first method I used was to take color photos with each illumination, and layer them on top of each other using the add blend mode. Using this blend mode adds the RGB values together. For example:

This method works well. It’s somewhat surprising considering that nothing I used was color calibrated.

The second method that I was more excited about was taking black and white photos of each and using those as the raw channel data to reconstruct the image.

I took the photos on my iPhone while using the black and white filter mode. I then used Affinity Photo to import the photos and assign them to channels. The end result was abysmal.

I was able to improve it a bit by mixing the blue channel higher and reducing the intensity of the green channel.

Still not great.

I believe some of the problems are that the BW filter on the iPhone is not at all true black and white. I was surprised initially to find that the image wasn’t actually grayscale. It was RGB. I also don’t know how the image is being converted to black and white. It’s plausible that in the process of converting to grayscale, more red and blue data is thrown away in favor of green because it produces a better result to our eyes.

Although this was a bit of an interesting exercise, I think in the end it didn’t achieve great results because of the lack of true black and white sensor. The color results would have been more meaningful if it had been achieved without any color aware equipment.

Additionally, I’d be interested in comparing a composited photo using 3 exposures with red, green, and blue lights to a composited photo using 3 filters and white light. Someday I can revisit this experiment once I procure a proper camera.

Wordle; the Latest Craze

Thursday, February 24th, 2022

Wordle has gotten popular. A cross between hangman and MasterMind, it’s cute, simple, and competitive. It has all the elements required to go viral. I finally decided to indulge in the clever word game about a week before it was purchased by the New York Times.

Since the New York Times took charge, there have only been minor changes. Some people are claiming that the New York Times has changed the word list, and is favoring more difficult words. There have also been some mishaps where users have gotten different words from each other.

The way Wordle was written, it has a list of 2,315 words completely exposed in the JavaScript code. Each day the next word in the list becomes the word of the day. One of the first words I encountered when playing was “moist,” the 228th word in the list. The next word, “shard,” appeared on the subsequent day, and so on.

I decided I wanted to see how the New York Times had modified the list. First, I had to find the original list. The original site, powerlanguage.co.uk/wordle/, now redirects to the New York Times, so in order to get the unadulterated code, I used the WayBack Machine to look at the site as it appeared before the sale.

The array of words is contained in a JavaScript file. I extracted the array of words from both the old and new, then compared.

6 words have been removed:

  • agora
  • pupal
  • lynch
  • fibre
  • slave
  • wench

Both “agora” and “pupal” are words that should have appeared in the last few weeks. In fact, “pupal” is the word some people got when visiting the original Wordle site on February 19, 2022, whereas the users who visited the new New York Times version got the word “swill” (which is two words later in the list).

Excerpt from original Wordle list

"moist","shard","pleat","aloft","skill","elder","frame","humor",
"pause","ulcer","ultra","robin","cynic","agora","aroma","caulk",
"shake","pupal","dodge","swill","tacit","other","thorn"

Excerpt from New York Times list

"moist","shard","pleat","aloft","skill","elder","frame","humor",
"pause","ulcer","ultra","robin","cynic","aroma","caulk","shake",
"dodge","swill","tacit","other","thorn"

Since two omitted words have been encountered, the original and new games are now off by two. The next omitted word, “lynch,” won’t be encountered for another 50 or so days (at the time of writing).

Despite the rumors, no words have been added, and the ordering of words has not been otherwise altered.

Since we are on the subject of Wordle, I decided it would be fun to make a utility to help guess the words. It would be too unsporting to just use the word list that the game provides, so I found a list of the most popular English words, and extracted all the five-letter words. This yielded about 3000 words, which is more than the official Wordle list.

I made a simplistic web app that can be used to input the letters and indicate if they appear green or yellow, or not used at all. The app will return a list of possible words for the given configuration.

I don’t condone cheating, and I don’t use this when I play Wordle. It was merely a fun exercise. You can try it out for yourself here.

Brisco County Jr. Orb Rod

Friday, September 10th, 2021

In 1993, The Adventures of Brisco County Jr. premiered on Fox. It was about a Bounty Hunter in the old west, and his mission to round up the gang of outlaws who killed his father, a famous Marshal. Brisco County is a Harvard educated lawyer who is eagerly looking to the future for the “coming thing”.

As he works to capture all the outlaws responsible for his father’s death, he has multiple encounters with a mysterious object only known as ‘the orb’. In the first episode we learn that the orb can grant power to people who possess it. As we continue through the season, we learn more about the orb’s power and origins, but its mystery isn’t completely unraveled until nearly the end of the season.

The orb is hard to describe. It’s a golden, spherical object with protrusions regularly distributed across it’s surface. These protrusions are the end-caps or glowing rods that can be removed from the orb. As a kid, I always thought that the orb’s mystery and power was very fantastic, and I always wanted to see it in person, or to own it.

Reference photo found on a prop auction site

I finally decided that it was time to replicate it. Not the whole thing, just one of the orb rods. I’ve done a bit of research here and there over the years and have never gotten a straight answer on the exact size of the prop. I managed to find a small image of a prop replica that was built from the same mold as the original prop. Luckily, this prop happened to be photographed next to a ruler. I inferred the measurements to the best of my ability and concluded that the prop orb rod is about 1.5 inches in diameter, and about 13.25 inches long.

Brisco County Orb Rod Plans

I was able to find blue acrylic rod in 1.5 inch diameter from a supplier on eBay for a good price. I then bought some Brass stock on Amazon, also 1.5 inches in diameter.

I don’t have any tooling for doing a rounded end of this diameter, so I used the lathe to create steps at 1/8 inch intervals in the brass that match the contour of a .75 inch radius sphere. I then used a file to smooth it down to a nice rounded end. A little bit of sanding, and then a clear coat of lacquer to prevent tarnishing, and the cap is finished. The reverse side was drilled out to 1 inch to accommodate the acrylic rod.

There wasn’t much to do on the acrylic rod, except to machine down one end in order to insert it into the cap. Additionally, the other end was fairly rough from being cut off with a band-saw by the seller. I used progressively finer sand paper on the end, finishing with a 2000 grit wet sanding to get it to be a clear and smooth as possible.

The last step was to epoxy the cap onto the acrylic rod.

Finally, after many decades, I have the prop replica I’ve always dreamed about.

Sadly, Brisco County Jr. was cancelled in its first season. Despite being cancelled, I find it to be an enduring show full of the witty one-liners you’d expect from Bruce Campbell, the charm of old spaghetti westerns, and a touch of sci-fi. Luckily, the show was able to satisfyingly conclude it’s storyline, so even while it was cancelled, it feels complete, and is one show that I frequently rewatch.