Yesterday I built a little tabletop Seattle. It was so much fun that I couldn’t stop there, and there was only ever one place to take it next. I grew up in Groveland, on the road to Yosemite, so the valley has been part of my life for as long as I can remember.

So the same little engine now carves Yosemite Valley out of real elevation data from the U.S. Geological Survey, and plants it with about 43,000 trees, seven waterfalls, the Merced River, the roads and trails, and one very famous campground. It runs in the browser, and you can spin it, tilt it, and watch the day turn to night over Half Dome.

Yosemite Valley, morning to night, in late October Β· USGS 3DEP elevation Β· OpenStreetMap Β· rendered in Three.js on GitHub’s free computers

7
Waterfalls traced
down their real cliffs
5,400 ft
Of relief, river
to highest point
43,000
Trees, oaks
in October gold
36
Tents in
Camp 4

Try it first

Drag to spin it, scroll to zoom, and tilt it all the way from a map view down to the valley floor. Fly to takes you to El Capitan, Half Dome, Yosemite Falls, Glacier Point, the Tunnel View or Camp 4. Flip the season to Spring snowmelt and the falls come roaring back. Bring in a snowstorm, or turn on Live sun to light the valley the way it looks right now.

Loads the live 3D valley right in this page (about 3 MB of data) Β· or open it full screen

A valley made by ice, river and time

From the Tunnel View the whole story is right in front of you. El Capitan stands on the left, Bridalveil Fall and Cathedral Rocks are on the right, and Half Dome sits at the far end. In the diorama you can see what it all looks like underneath, too: a deep, steep-walled trough with a floor so flat it looks poured.

The miniature Yosemite Valley seen from the west in late afternoon: El Capitan on the left, Cathedral Rocks on the right, and Half Dome at the far end, with forest on the rims and gold oaks along the valley floor

The Tunnel View, more or less: El Capitan on the left, Cathedral Rocks on the right, Half Dome at the end of the valley.

Half Dome, peeling like an onion

Half Dome is the one everybody knows. The great curved shape you see from the valley isn’t carved by ice alone. Granite that formed deep underground is under pressure, and as the rock above it wears away it expands. It cracks into sheets parallel to the surface, called sheeting joints, and the sheets peel off one by one. Geologists call it exfoliation, and it’s what rounded Half Dome, North Dome and the Royal Arches.

Half Dome in warm afternoon light in the miniature valley, its sheer north-west face and rounded back above Tenaya Canyon, with the Merced flowing past on the right

Half Dome in the afternoon, from the north-west, with the 100 m contour lines that run across the whole diorama.

The waterfalls (and why one is missing)

Yosemite Falls is one of the tallest waterfalls in North America, 2,425 feet from top to bottom: a 1,430-foot upper fall, the middle cascades, and a 320-foot lower fall. In the diorama all seven falls (Yosemite, Bridalveil, Ribbon, Horsetail, Vernal and Nevada) are traced down the real cliffs in the elevation data. The code searched for the steepest path near each one that drops as far as the real waterfall does.

Here’s the catch. The diorama is set in late October, and in all but the wettest years Yosemite Falls has run dry by late summer. So by default it isn’t there, just a dark streak on the rock where the water usually runs, while Bridalveil and the Merced falls keep a thin flow. Flip the season to Spring snowmelt and they all come back at once.

The north wall of the miniature valley in spring, with Upper and Lower Yosemite Fall flowing white down the granite and creeks running high in the forest above

Spring snowmelt: Upper and Lower Yosemite Fall running again.

The climbers of Camp 4

Tucked into the trees just west of Yosemite Valley Lodge, under Columbia Rock, is a plain little walk-in campground that changed the history of a whole sport. In the diorama it’s a cluster of colorful tents, and after dark their lanterns come on.

Close-up of the miniature valley floor: a cluster of small colorful tents among pines and oaks below the north wall, with the lodge buildings, roads and the Merced River nearby

Camp 4, tucked in the trees below the north wall, with Yosemite Valley Lodge next door.

Headlamps on El Capitan

My favorite little touch comes at night. Slide the clock to Night, fly to El Capitan, and there are tiny lights scattered up the face. On a real summer night you can see them from El Cap Meadow: climbers’ headlamps, hundreds of feet up, where parties have stopped for the night on ledges or hanging portaledges, halfway through a multi-day climb.

El Capitan at night in the miniature valley, the great wall in blue-grey moonlight with small warm points of light scattered across its face

El Capitan after dark, with climbers’ headlamps on the wall.

The people of Ahwahne

Long before it was a park, the valley was a home. The Ahwahneechee called it Ahwahne, and they lived there for thousands of years, with about 450 people in nine villages when the first Americans arrived. Black oak acorns made up a big share of what they ate: dried, ground, rinsed and cooked into mush or bread. The gold and orange trees scattered across the diorama’s valley floor are those California black oaks, turning color in late October.

In 1851 the Mariposa Battalion came into the valley, burned villages and food stores, and gave the valley the name we use today. Thirteen years later, on June 30, 1864, President Lincoln signed the Yosemite Grant, setting aside the valley and the Mariposa Grove of giant sequoias, the first time the federal government set aside wild land for people to enjoy. The national park around it followed in 1890. Descendants of the valley’s first people are still here; the Southern Sierra Miwuk Nation is seeking federal recognition.

Looking up the miniature valley from above Glacier Point, with Half Dome, Tenaya Canyon and the high country beyond in warm evening light

From above Glacier Point, looking up toward Half Dome and the high country.

How it’s made

It’s the same engine as my Seattle diorama, with a second kind of place. A Python script asks the USGS 3D Elevation Program for the valley’s terrain on an 18-meter grid, then pulls OpenStreetMap for the river, the roads and trails, the meadows, the lodges and the named places. From the shape of the land it works out where granite shows through (anything steeper than about 38 degrees), where the forest grows, and where snow would sit. It plants the black oaks on the flat valley floor below about 4,300 feet and pines everywhere else, then traces each waterfall down its cliff.

The browser does the rest in Three.js: the terrain mesh, the layered rock walls of the slab, contour lines every 100 meters, and the water, falls, headlamps and lanterns, all drawn with small shaders. The whole thing is built and published by GitHub Actions, and the film was rendered there too, split across 20 free computers.

It’s a tabletop model rather than a lidar portrait. An 18-meter grid smooths the big walls a little, so for the real texture of the granite see my Yosemite flyover, which was made from 1-meter lidar. The two make a nice pair. As before, I built it with Claude: I brought the places and the memories, and Claude wrote the code. The code is on GitHub.


Go deeper

👉 Start here

The live diorama — spin it, change the season, bring in snow. Tuolumne Meadows and Mono Lake are in the place picker too.

Yosemite flyover — the same valley on 1 m lidar, Half Dome to Tunnel View and back on a June evening.

📺 Watch

Valley Uprising (Sender Films, 2014) — the story of Camp 4 and Yosemite climbing from the 1950s on, with many of the people in this post.

📄 Read

NPS: Rockfall in Yosemite · NPS: Researching past glaciers in Yosemite · NPS Occasional Paper 5: geology of Yosemite Valley · Physics Today: explaining sheeting joints on Half Dome

NPS: Waterfalls · NPS: Horsetail Fall · Wikipedia: Yosemite Falls

Wikipedia: Camp 4 · National Register of Historic Places: Camp 4 · Midnight Lightning · The Nose

Wikipedia: Ahwahnechee · NPS: Yosemite anniversaries (the 1864 Grant)

📊 Data & tools

USGS 3D Elevation Program — the terrain. · OpenStreetMap — rivers, roads, trails and names, © OpenStreetMap contributors (ODbL). · Three.js · the code.