Pages

Showing posts with label science. Show all posts
Showing posts with label science. Show all posts

Sunday, May 21, 2017

Too Bright, Too Dark

The visible world around us is constantly changing. One second we may have the sun in our eyes, and another we're in a dark closet trying to find the light switch. Such fluctuations in brightness could have ended up being a serious problem for our vision if it weren't for a handy built-in feature: our eyes automatically adapt to the lighting conditions of the surrounding environment.

Most people are well aware that their pupils change size to handle lighting conditions. A larger pupil admits more light and makes the scene brighter, while a smaller pupil admits less light and makes the scene dimmer. This mechanism is fast and effective, and is controlled by the brain stem, which acts autonomously - you don't even have to think about it.

As useful as this type of adaptation may be, it has some limitations. For example, most artificial lighting is 20 times dimmer than the sun, while pupil dilation only brightens light by a factor of 4 (when compared with a fully constricted pupil). And then there are all those backlight situations - like when an unknown person is standing in front of a bright window, and you need to see whether it's a home intruder or a visiting friend. In short, pupil adjustment is insufficient. So what else do we have?

The answer: sensory adaptation. This term refers to the loss of sensitivity that comes after exposure to a stimulus, an ability that is actually shared by all of our senses. If you've ever looked for your glasses only to find them on your face, you've experienced the effects of sensory adaptation. It's useful because it eliminates old data so it doesn't obscure the new data (kind of like what Facebook does with old and new posts).

Our vision is also subject to sensory adaptation: try staring at the same point for 2 minutes, and everything will fade to the same shade of grey. This happens because the retina becomes desensitized to what it sees. Bright light causes the retina to become less sensitive, making the light appear dimmer. Dim light allows the retina to regain lost sensitivity, so the light seems brighter. In addition, different parts of the retina are affected independently, so while one object is darkened, an object right next to it could be brightened. Hence, the bright and dark areas of a scene are both made less extreme, so that the scene as a whole becomes easier to see.

There are two types of adaptation to light in vision, then. The first type affects the whole image, and is accomplished by pupil dilation/contraction. The second type can control different parts independently, and is accomplished by sensory adaptation.

***

What remains is to find a practical application. Obviously, photography is the place to go. A digital camera is very similar to an eye: both detect light, and both relay information to a central processor (whether a computer or a brain). One of the biggest differences between these two tools is the way they adapt to light.

Most cameras have an adjustable aperture. The aperture is the hole that light enters through. It usually contains a system of tiny fins which move to make the aperture larger or smaller, and are adjusted (often automatically) based on the brightness of the scene. This corresponds directly with the pupil in the human eye.

A camera can also adjust the exposure time, which is the amount of time that the shutter is open and light is permitted to enter into the camera. If the camera is digital, it can adjust the sensitivity of the sensor, which involves multiplying the data from the sensor by some numerical value. These mechanisms correspond partially with the second type of eye adaptation: they control the brightness (or, more properly, "exposure") of an image, but they cannot control parts separately. In other words, unlike the eye, a camera always adjusts the brightness of the whole photo equally.

This is actually a pretty big problem, because many photos end up looking completely different from reality. Next time you get the chance, try taking a photo of a person standing in front of a window. Visually, you will see both the person and the background, but the camera will either make the person a silhouette, or will wash out the background.

The solution is a technique called high-dynamic-range (HDR) imaging. In HDR imaging, multiple photos are taken with different exposures. Then, the best parts of each image are combined to form a single image that is more evenly exposed. Some people criticize HDR images for being artificial, but when done well, HDR images mimic human vision much better than normal photographs do.

As an illustration of this technique, I'll describe my process making an HDR image of a chapel at night. I started by taking these four images:



As you can see, the chapel is mostly washed out in the first image, but in the later images, the sky and the surrounding buildings look too dark. Using GIMP, I stacked the images, and used layer masks to make the images transparent based on brightness. The result was an image that showed detail on the chapel, without losing the surrounding buildings or the light on the clouds.


And that's it - a great image out of a number of okay photos. Kind of cool what you can do when you apply biology to technology, isn't it?


Wednesday, August 10, 2016

Reentry

Painting of space shuttle Columbia during reentry

A bright star streaks across the sky, leaving behind a glowing trail that soon fades back into the blackness of the night sky, leaving no perceptible trace. A minute later, another streak appears; this one has faint hues of pink and orange. Each streak lasts only a couple seconds, but its quiet beauty is not easily forgotten.

Maybe I could write a kid's book about it:
Fast star, slow star
Red star, blue star

The sight I'm describing is called a meteor (as I'm sure you already know). Meteors have been observed for as long as humans have existed, and have been a mystery for almost as long. It didn't take long to figure out  that they occurred high in the atmosphere - in fact, the name "meteor" was originally used for any atmospheric event - but it wasn't until the 19th century that somebody finally realized what they actually were: small bits of space debris burning up as they fell through the sky.

The question that naturally comes next: how does a meteor get so hot?

Monday, May 2, 2016

Black Holes


On February 11, scientists at the Laser Interferometer Gravitational-Wave Observatory announced that they had detected gravitational waves from one of the most powerful events in the universe: the collision of two black holes. In light of this event, I thought I'd post a basic overview of black holes.

Black holes exist in that fuzzy realm on the border between theory and fact. A surprising amount of information regarding these mysterious objects has been determined through mathematical proof, and yet there are still dozens of questions to answer and apparent contradictions to explain. We don't completely understand how they work, but we know they exist.

Because of its strange nature, the idea of the black hole plays a large role in the average person's concept of the universe. Everybody knows about black holes. The problem is, most people don't understand what a black hole is. Some people imagine black whirlpools sucking everything in. Other people imagine powerful vacuum cleaners, from which nothing can escape. The truth is a little different.

Monday, February 29, 2016

Efficient Acceleration

Here's a simple physics puzzle: suppose you're launching a model rocket. You want the rocket to go as high as possible. Is it better to design the rocket to:
A. Use all of its fuel very quickly, and then use its momentum to travel high
B. Use the fuel gradually over the whole duration of the flight

In other words, what is the fuel consumption rate that will maximize the height of the flight path? For this problem, we can assume that the thrust is proportional to the fuel consumption rate.

I'll try to post a solution to the problem in the future.

New posts every month - subscribe for free!

Friday, December 18, 2015

Gravity

Bubbles in space
Imagine the universe is filled with water. Instead of empty space, every inch of it contains pure water. No planets, no stars, only water. What happens? And what would happen if an air bubble formed?

The answer to this question requires a basic understanding of gravity.

Saturday, October 10, 2015

Lunar Eclipse

Total lunar eclipse

Near the end of last month, the moon passed entirely through Earth's shadow, resulting in a full lunar eclipse. The moon didn't completely black out, due to sunlight scattering through Earth's atmosphere. Instead, the moon had a dim reddish-brown glow.

Of course, I took I lot of photos of this celestial phenomenon. I started taking photos during totality. I kept taking photos a couple times per minute, for a period of about 1.25 hours, until the moon was fully lit. My goal was to put the photos together, for an animation of the moon passing through the shadow of the Earth.

Monday, August 10, 2015

Things in the Sky

The Perseid meteor shower is coming up! After midnight on Tuesday, and again on Wednesday, an observer under a dark sky may see up to 100 meteors per hour - an average of nearly 2 per minute. If you live in a city, the light pollution will wash out most of the meteors, so the countryside or mountains will be a much better place to watch them.

Meteors start as small bits of material floating in space, usually dropped from comets that passed through the area. At this stage, they are called "meteoroids". When the earth passes through a cluster of these particles, they hit our atmosphere and burn up as meteors, and we have what's called a meteor shower. If you're looking up at the sky, and you see a streak of light zip a short distance and then disappear, this is a meteor.

One of the best things about this particular shower is that the moon won't come out all night, so the sky will be darker than usual - making it possible to see more meteors than in most showers.

If you go outside to a dark location, here are a few other things you may see:

Wednesday, August 5, 2015

Which Hurts More?

212° F
Let's play a little game. I'll list a bunch of possible actions. Each action will have 2 variations, (a) and (b). You choose either (a) or (b), depending on which would be safer (or less painful). Each of the questions will involve an oven hot enough to bake a cake (350° F), and a pot of boiling water (assume we're at sea level). So... would you rather:

1.
    (a) Stick your hand in the oven
    (b) Stick your hand in the boiling water
  ... for a period of 10 seconds


2.
    (a) Leave a fork in the oven
    (b) Leave a fork in boiling water
  ... for a period of 15 minutes. Then hold the fork tight with your bare hand.


3. Fill a jar to the top with cool tap water. Then:
   (a) Place the jar in the oven
   (b) Place the jar in the boiling water
  ... for a specific, but unknown, period of time. Then remove the jar and put your hand in it.


First see if you can figure these out yourself. They shouldn't be too hard. If you have trouble, heat up your oven and boil a pot of water, and see for yourself what hurts more. (NOTE: I take no responsibility for any resulting injury.)

Tuesday, July 14, 2015

Pluto No Longer on the Horizon

This morning, New Horizons became the first spacecraft to make a flyby observation of the Pluto system. During the mission, the spacecraft captured the most detailed photographs of Pluto's surface we've ever had, and possibly ever will have. It also found many new properties including size, mass, atmosphere, and surface composition.

In a period of a few hours, we discovered more about Pluto than we've found in the 85 years since Clyde Tombaugh captured its first photograph.

Thursday, April 30, 2015

Is MSG Safe?

Monosodium glutamate, commonly abbreviated MSG, is a very common chemical used to enhance flavors in food. MSG works by activating the "umami" receptors on the tongue, effectively enhancing flavors and making food taste a lot better. This is similar to the way sodium chloride (table salt) works, but MSG is much more powerful, so sodium content can be reduced by adding MSG to food. For this reason, many food companies use MSG as a food additive.

Despite these apparent advantages, most people would agree that MSG is unhealthy and should be avoided. Sensitive individuals even experience negative side effects after consuming food containing MSG. But what exactly is wrong with MSG? If a person is not MSG sensitive, is it okay for them to consume it in their food?

Friday, January 23, 2015

Snowflakes


In the realm of science, there are many things which are not fully understood. The mechanism behind the formation of a snowflake crystal is one of these things.

Friday, October 31, 2014

Partial Solar Eclipse


About a week ago, I was finally able to observe the second solar eclipse of my life – a partial eclipse with a maximum coverage of about 50%. The only other eclipse I have observed was another partial solar eclipse in May 2012.

Friday, October 3, 2014

Visualizing Time: An Essay

If time were stopped, would this falling pen look blurry to us?
Time can be a very confusing subject. It has a past, a present, and a future, but the future keeps changing and the present is always moving, while the past grows larger. Although most people think they understand time, they often get confused when they try to describe it. To help visualize and understand time, many people compare it to a very familiar concept: a line.

Thursday, June 12, 2014

B17: The Killer Vitamin

What is a vitamin? I don't mean the different types of vitamins or the shops where they can be bought. I mean, what makes something a vitamin? Perhaps a vitamin is only a useless chemical that serves no purpose, and is therefore called a vitamin to make it seem useful when it really isn't. I prefer to think of a vitamin, however, as an essential chemical that our body needs to grow and survive.

Friday, May 30, 2014

Did You Know...

I recently added a "Did You Know" app to the sidebar of my blog. The app randomly picks a math/science/technology fact from a list, and displays it. I had to write the app myself (with JavaScript and HTML), because Blogger doesn't have an app like that built-in, and even if it did, I like to have control over my things.

To get technical: the data is stored on Firebase. The app reads the data from Firebase, and adds it all to an array. There is no way to tell how many items there are without reading all of them from Firebase. The app then looks at how many elements are in the array (call that number a) and then randomly chooses a number b from 1 to a. It then takes the bth element from the array, and displays it. (I know, I didn't have to store them all in an array, but it's easier that way.)

Because of the data storage method, I can add new facts very easily: I just have to go to Firebase and add the new fact to the database. Of course, my app updates as soon as I add the new data. I can also set up the app to read data from a different Firebase location, so I can easily have multiple apps with different themes. Here's a screenshot of a Minecraft-themed app, for example:


If anybody is interested in putting a version of the app on their blog, let me know! I'd be happy to set up a version of my app with another theme, such as astronomy, animals, or sports. I can also change the style to make the font pink or green, or give it a purple background, before I send you the code. The possibilities are endless.

To receive updates, subscribe now!

Saturday, December 7, 2013

Orange Candle

This candle was leaning over too far, so I propped it up with a folded piece of paper.
In the cold, dark months of the year, candles are more than welcome. Not only do they give off a cozy light, but they also give off heat and warmth. The trouble is that candles cost money - not only for the candle itself, but also for the candle holder. So is there an alternative to buying candles?

Wednesday, October 2, 2013

Psychological Videos

Here's an explanation: My college psychology teacher is probably the best teacher I've ever had. She shows fun videos, has the students do fun activities, and allows the students to give presentations to help the subject matter sink into their heads better. It would probably seem a little odd to see college students making paper "brain hats," but the students (especially the girls) enjoy that kind of thing more than the average person would probably think.

Anyway, the last two videos she showed us during class were TED talks. They pertained to what we were learning at the moment - namely, the mind's perception of things and attention. I enjoyed them, so I thought I'd post them on my blog in case somebody hasn't seen them yet.

Here are the videos, embedded. When given instructions, be sure to follow them carefully so you'll better understand what they're getting at:




Wednesday, August 7, 2013

Mesocyclone


The sky was dark. Occasional raindrops pattered outside. Thunder rumbled. A computer geek sat in the glow of a computer, typing and staring at the screen as if in a trance. He happened to be working on an instant chat application, using HTML, CSS and JavaScript. When he was complete, he would host one version of the app on his Computer Science blog. He later hosted another version HERE.

Suddenly, the wind outside picked up all at once. As it howled, the windows cracked and popped. At one corner of the house came a spooky moaning sound. Only then did the geek come out of his trance; he stopped typing and turned towards the window.

That geek was me. The reason I ceased to type was because I knew that the pickup of wind was unusual, and that it can be a sign of a nearby tornado. I scanned the fields, trying to guess approximately how strong the wind was. The wind had picked up dirt and was blowing it through the fields, so I knew from experience that the wind was particularly strong. I got out of my chair and looked up at the sky through the windows, checking whether a tornado was forming. Ever since I was very young, I was fascinated with tornadoes, and was always on the lookout, hoping to see one. I sometimes dream about tornadoes. Unfortunately, we live in a place where tornadoes are rare, so I've only seen a single tornado my whole life.

I noticed clouds turning in the sky - a mesocyclone. A mesocyclone is a vortex of air within a convective storm - that is, rising air that spins. I called the rest of my family to come look at the turning clouds. I ran and got my camera, and started filming. I really hoped some kind of tornado would form; even a small, weak one would have satisfied me. I watched the clouds as a funnel started to form. Then it dissipated; a tornado never formed.

I had been hoping for a tornado, but what I saw was the next best. I had read a lot about mesocyclones, cumulonimbus clouds, and thunderstorms, and it was very interesting to see it in real life. I could even see the opening for the rear flank downdraft.

I later took the videos I got and removed parts of them. Here's the result:


Saturday, August 3, 2013

Pileus Clouds

A cumulus cloud with pileus. This pileus is a small one.
There are multiple pilei on the cloud in this photo.
See if you can find them.
Pileus, pronounced pie-lee-us, is a small, smooth, silky-looking lenticular (lens-shaped) cloud that can appear above parts of either a cumulus or cumulonimbus cloud. (If you don't know what a cumulus cloud is, click HERE. Cumulonimbus clouds are basically very large cumulus clouds.) A cloud attached to pileus is said to be "with pileus" or to "have pileus".

Clouds with pilei can develop into very large
cumulonimbus clouds.
Pilei form when a strong updraft at a lower altitude acts upon air at a higher altitude, and causes it to cool below its dew point. The result is that as the air cools, the water vapor in it condenses and forms a cloud. Because of the conditions required for it to form, a pileus cloud is usually a sign of severe weather; the cloud that it forms above is likely to develop into a cumulonimbus if it hasn't already.

Early this afternoon, it was bright and sunny, but there were a couple of cumulus clouds with pileus, so I immediately predicted a thunderstorm. Sure enough, only a couple hours after that, it started raining harder than it has in a long time, and I could smell ozone from the lightning that kept flashing outside.

It isn't raining any more, but I can see a huge cumulonimbus far in the distance, and dark clouds overhead.

Monday, April 29, 2013

Sprout Jar

Photos of seeds from yesterday, to scale.
The onion is the one on the left.
A couple of days ago I planted 3 seeds in a clear glass jar, so I could watch them germinate. 2 of the seeds came from one of my basil plants, and the other came from a green onion plant. This is partly a test on the quality of my home-grown seeds, but also a fun gardening activity; after all, who wouldn't like to sprout  some seeds and watch them grow?

Here's how you can make your own sprout jar: