Work & notes

Fun project: Baby vision simulator

  • Vision Science
  • WebGL
  • Fun Project

I was curious how my newborn daughter, Klara, experiences the world. So I vibe-coded this simulator. Try the demo image or turn on your camera, then move the age slider to see what changes. In birth date mode, the default is Klara’s birthday.

What do these numbers mean?

Fine detail, also called visual acuity, is how tightly black and white stripes can be packed before they blend together. One stripe pair is one black stripe and one white stripe. A degree is a measure of how much of your view the pattern takes up, not how big it is in pixels. The simulator uses this number to set the strength of a blur: fewer stripe pairs means more blur.

The contrast threshold describes how different the light and dark stripes in a broad pattern need to be before the pattern is detectable. This estimate combines two types of experiments: one observed where newborns looked, the other measured the brain’s electrical response. The percentage is not a slider for how much contrast the picture keeps.

Click or tap the image to move the focus point. With the preview selected, use the arrow keys. Newborn focus barely follows the target. Camera focus requires enabling Depth-aware focus.

What the simulator shows

This is not a literal view through child’s eyes. I’m changing a camera image so an adult can get a feel for which fine details, weak contrasts, and color differences might be easier or harder for a baby to pick up. The studies measure what babies can detect or distinguish under specific conditions, not what the world looks like to them.

The stripe number sets the strength of a Gaussian blur. The lower the number, the more the filter softens fine patterns. It does not erase detail at an exact cutoff. Real infant vision depends on how the eye focuses light, how the retina responds, and how the developing brain processes those signals. A filter on an adult’s screen can illustrate some of those limits without recreating the experience.

A few ages to try

  • Week 0. Start here and hold the compare button. The blur starts from a newborn median of about 0.8 cycles per degree in a looking test with black and white stripes. The filter also tones down contrast and color, but the image is not black and white.
  • Around week 4. Try moving the focus point from a hand to a face. In the model, focus moves only part of the way toward the new target. At week 0, moving the point does not change the focus plane at all.
  • Around weeks 8 to 13. Blue-yellow differences become more visible in the demo. By week 13, the model is at about 3 cycles per degree, so more of the fine detail comes through.
  • Week 52. The model is at about 9 cycles per degree. There is still a difference when you compare it with the unfiltered image.

The slider interpolates between age points. These are useful stops to try, not week-by-week measurements or milestones for an individual child. The optional focus effect estimates which parts of the scene are nearer or farther. It does not measure their distance from the camera. The demo image was generated with Gemini.

How I limited color

In one study, more newborns picked out a large, saturated red patch against gray than picked out blue under the same test conditions. That does not mean newborns see only red, or that the study tells us how saturated a red object looks to them.

In the shader, I separate brightness from two color differences: red versus green and blue versus yellow. At birth, I keep just 15% of the first difference and 2% of the second, before applying a separate saturation adjustment. As you move the slider, the red-green difference comes back sooner. The blue-yellow difference rises more gradually and reaches its full setting at about 12 weeks, with some overall desaturation still applied. Those percentages are my filter settings, not measurements of what babies see. The contrast filter is also an interpretation: a threshold for detecting a test pattern does not tell you how much to dim the contrast of a whole image.

Sources and what I used them for