Tyler Morgan-Wall
banner
tylermw.com
Tyler Morgan-Wall
@tylermw.com
R, data science, dataviz, maps, experimental design, raytracing. Developer of rayshader, rayrender, and the rayverse | PhD in Physics from Johns Hopkins | Penn
Manhattanhenge: On May 28th/July 13th, the sun aligns with Manhattan's street grid 29° from N. This twice-a-year alignment of urban planning and orbital motion serves both as a temporal tourist attraction as well as a particular good test case for geospatial skymap alignment! #RStats #rayrender
November 9, 2025 at 10:49 PM
Rendering the peak of Mount Everest from sunrise to sunset in R with rayshader and rayrender

#RStats #rayrender #rayshader #rayverse
November 9, 2025 at 4:41 AM
1) Keeping the exposure the same as the dawn image at noon: yuck!

2) Adjusting the exposure down three stops with rayimage::render_exposure(): Nice!

#RStats #rayrender
November 8, 2025 at 4:20 AM
Rendering a tilt-shifted Mount Everest at dawn:

(dawn and dusk are the "magic hour" in rendering too, because you can represent an image in the dynamic range of a PNG/JPEG without clipping or tonemapping hacks!)

#RStats #rayrender #rayimage
November 8, 2025 at 4:07 AM
Absolutely, the fact that we have so many coordinate systems to deal with our dumb ellipsoidal earth means needing to understand incomprehensible incantations like what's listed below... just to load in data

Thankfully sf and terra have done a good job making the process very copy/pastable
November 8, 2025 at 2:09 AM
Only takes a few lines of code to make a beautiful 3D plot in R!
----
library(rayshader)
montereybay |>
sphere_shade() |>
plot_3d(heightmap=montereybay,zscale=50, water=TRUE)
render_highquality()

(I'm cheating of course--the annoying part is loading the data into R!)
November 8, 2025 at 1:58 AM
can't see how this could go wrong
November 8, 2025 at 1:37 AM
uhh always check your gif's AI-generated alt text before posting
November 8, 2025 at 1:37 AM
A set of new render_highquality() options coming to a #rayrender near you 😀
November 8, 2025 at 1:17 AM
Day 6 of the #30DayMapChallenge (3D), a render of Mount Rainier with a realistic atmospheric skydome generated w/ a lat/long/datetime, rendered entirely in #RStats with #rayshader and #rayrender! The atmosphere is annoyingly realistic: I now have to dial in the exposure depending on the time of day!
November 8, 2025 at 1:14 AM
Latest innovation: using RStudio's document outline view + emojis to annotate groups of targets so I can quickly jump through and navigate a very, very long {targets} pipeline.

(now RStudio just needs hierarchical section folding, like Positron, so I can hide everything else away!) #RStats
November 6, 2025 at 9:38 PM
Good instinct! Don't do what I did and be seduced by the relative simplicity of the Felkel and Obdržálek algorithm and waste months trying to patch it to work robustly (turns out the alg isn't correct, and calculating a SS robustly can't be done with float/doubles, only exact arithmetic)
November 6, 2025 at 8:02 PM
Also, here's the #RStats code for the pumpkin:

gist.github.com/tylermorganw...
November 1, 2025 at 4:04 AM
Happy #rayrender Halloween indeed!

@tterence.bsky.social inspired me to whip up an animation: a pumpkin made entirely in rayrender! (CSG for the carved pumpkin, extruded path stem, cyl + sphere candle, and r_obj eyes)

Also, denoising made the below animation render in <3 minutes! #RStats
November 1, 2025 at 3:59 AM
As long as you don't care about hitting the same seed because dates lined up
October 22, 2025 at 3:07 PM
set.seed(42)
set.seed(sample(1L:(2L^32L),1))

😀 #RStats
October 22, 2025 at 2:55 PM
Nice! Love new meshing projects. FYI, you can fairly easily install OIDN (see attached image from rayrender's GH repo) and get fast de-noised output to remove all those fireflies from the rayrender output without increasing sampling time
October 13, 2025 at 3:05 PM
"Man, I really wish RStudio respected hierarchy in code-folded section headers... I wonder how easy it would be to..."

(inner voice: DON'T DO IT! IT'S NOT WORTH IT! JUST GET BACK TO WORK! THE YAK IS BEST LEFT UNSHORN!)

"... I'm gonna do it."

#RStats #RStudio
October 10, 2025 at 12:55 PM
You can get pretty far but that approach, but you can end up with degenerate scenarios like below with no good ordering. One thing you can do to work around that is just to subdivide meshes so they are made up of smaller triangles, which make it harder to run into such scenarios.
September 15, 2025 at 1:13 PM
One of my favorite things about developing rendering packages is finding real world "golden" tests: I'm finalizing a realistic sky generation package and saw the moon in a nice configuration with the sun yesterday, so I snapped a pic, compared the render, and fixed a small vector math bug! #RStats
September 15, 2025 at 1:06 PM
I do appreciate when a satirical website goes all-in on the premise: there's blog posts, job announcements, and more little details that definitely provide several Hearty Chuckles worth of entertainment (such as the job posting below)
September 11, 2025 at 3:25 PM
5/5 Focusing back on a single lat/long, here we simulate the analemma across the day in DC (here, in 30 minute increments) to see how the shape changes position across the sky/year. Basically, visualizing a 2D projected slice of 4D time/space: that's a fun #dataviz!

#RStats #rayverse
August 19, 2025 at 2:13 PM
4/5 As an extreme example, you can plot the analemmas for noon and see that it's below the horizon for part of the year in the arctics: this is when those latitudes are in the long polar night! (the crazy looping around latitude = 0 is just from a singularity due to the spherical-to-rect projection)
August 19, 2025 at 2:13 PM
3/5 The orientation and position of the analemma depends on your latitude and the specific time of day. Here's the analemma for 5 PM taken from the South Pole to the North Pole in 10 degree increments. When it is partially below the horizon, it means the sun has set by that time for part of the year
August 19, 2025 at 2:13 PM
2/5 The curve the sun travels is called an analemma, from the Ancient Greek ἀνάλημμα: the funky path is due to earth's tilt and elliptical orbit. It looks differently depending on where on earth you are situated: compare DC at noon with the equator (which has the sun directly above at one point!)
August 19, 2025 at 2:13 PM