Umbra
- 5 Devlogs
- 19 Total hours
Simulates exoplanet transit detection from Earth, with variables that can be used to explore how different planet sizes and orbits can affect a star's observed light curve.
Simulates exoplanet transit detection from Earth, with variables that can be used to explore how different planet sizes and orbits can affect a star's observed light curve.
Real telescopes don’t hand you a perfect light curve, they hand you a noisy mess with a signal buried in it, so I added a noise toggle to make Umbra actually look like real data instead of a simple ahh textbook diagram
Used a Box-Muller transform to turn two uniform randoms into a proper gaussian sample, tuned roughly to TESS-scale scatter so it’s not comically noisy, just enough to make the dip look like something you’d actually have to squint at
New “N” button sits next to the reset one, goes amber when it’s on, same button family as everything else up there
The bit I actually spent time thinking about, which was that the noise only touches what gets drawn on the graph, not the underlying flux value. Transit detection, transit counting, period measurement, and the stats panel all still read the clean number
I wanted it this way on purpose, in real analysis you don’t just throw the noise away, you fit the curve through it, so having Umbra’s detection stay accurate underneath a noisy-looking graph felt like the more honest way to represent that, rather than making the sim itself worse at its job just for realism points lol
circleOverlapArea() using the proper lens equation, it takes the centre distance plus both radii and works out the exact overlapping regionGenuinely didn’t expect the geometry bit to be the harder half of this session, Kepler felt like the scary one going in but the overlap maths turned out to be the fiddlier of the two!
Real orbits speed up near the star and slow down far away (thanks Kepler), so I had to actually solve Kepler’s equation properly instead of faking it
Problem is M = E − e·sin(E) has no closed-form solution for E, you can’t just rearrange and solve for it like a normal equation, which I did not know going in and briefly panicked about
Ended up using Newton-Raphson to solve it numerically, feels very full circle after doing the same kind of thing for my EPQ (orbital sim for near-Earth objects), except this time it’s converging in like 5 iterations instead of me validating against JPL Horizons for weeks lol
Pretty happy with this 4 hours cause it means I now have actual physics rather than some fake thing only added for the visuals.
below are some snippets from the solvers but not the full code of course
Ok, I’ll admit I wasn’t too consistent with devlogging as I was with my other projects, so I’ll keep this detailed for that storytelling rating 
So I started by adding the four sliders - the planet radius, orbit radius, speed, and eccentricity. The eccentricity one was probably the most interesting to build because I didn’t want it to just go from 0 to max in one direction, I made it signed so zero sits in the middle of the slider and you can push the elongation either way. Felt much more intuitive to use.
I also had to add a clamp so the orbit can’t intersect the star — without it you could drag the eccentricity up until the planet was literally passing through the star which looked awful. It recalculates the safe maximum every frame based on whatever the other sliders are at, and goes amber with a little “(max)” label if you’re hitting the ceiling.
Then I added presets (as always lol): Hot Jupiter, Super-Earth, Earth-like, Eccentric Giant, Grazing Transit, as a dropdown that snaps all the sliders at once. Wanted a way to show off what different orbit types actually look like on the light curve without the user having to dial everything in manually.
Each preset fires a little toast notification from the top of the screen with a one-liner about what makes that orbit interesting, which I’m pretty happy with.
Last thing was the reset button — just a ↺ in the top right that puts everything back to defaults and clears the graph.
Small thing but its actually really useful when you’ve been toying around with this all day 😭, saves me a bit of sanity.
If you want more on what I did and why I did it feel free to check out https://instagram.com/urged.st where I post video devlogs!
Alright, we’re really hitting the ground running with this one.
Started yesterday and I’m already 4 hours deep (my goal is 10hrs minimum for each simulator)
Added the heavy UI now so I don’t have to write paragraphs later (wasn’t too bad lol, same styling as the other two sims)
Added an orbiting planet
(yes I spent two hours + on the planet and getting its orbit right…)