Jekyll2017-11-15T22:28:44-06:00https://www.rememberautumn.com/blog/Wandering AutumnExploring change and the life that comes with itKeith BertelsenThe Evolution of Trust2017-11-15T22:16:00-06:002017-11-15T22:16:00-06:00https://www.rememberautumn.com/blog/2017/11/15/the-evolution-of-trust<p>This is a fantastic little simulation of (a variation on) the Prisoner’s Dilemma, and is totally worth a chunk of your time. In general, the Prisoner’s Dilemma is something I like to bring up in discussions of cooperation problems and the like, and this delves into the heart of the matter pretty well.</p>
<p>Identifying the problem is easy (if you pay attention to game theory). Solving it is much harder.</p>Keith BertelsenThis is a fantastic little simulation of (a variation on) the Prisoner’s Dilemma, and is totally worth a chunk of your time. In general, the Prisoner’s Dilemma is something I like to bring up in discussions of cooperation problems and the like, and this delves into the heart of the matter pretty well.Broken Feeds2017-10-11T21:51:00-05:002017-10-11T21:51:00-05:00https://www.rememberautumn.com/blog/2017/10/11/broken-feeds<p>The short summary is that in fiddling with my blog, I permanently broke the RSS/Atom feeds I used to have. If you subscribed to those in the past, you need to subscribe to <a href="https://www.rememberautumn.com/blog/feed.xml">my new feed</a>.</p>
<p>I blame Octopress.</p>
<p>Though that doesn’t really explain anything.</p>
<p>So back when I started this incarnation of my blog, I realized that I didn’t want to use something like Wordpress again. The friction inherent in writing a new post—along with my consistent worry about how the posts would be backed up—was just too much. I needed to do something different.</p>
<p>Some coworkers of mine were attempting a competition at the time, to just regularly blog. Part of me wanted to join their quest, part of me knew that my previous blog was basically a disaster.</p>
<p>But I was looking at various other ways of doing blogs—and I was also getting interested in static site generation.</p>
<p>Somehow or another, I ended up looking at Jekyll. And then discovering that Atom had a plugin that played nice with it. And possibly some other things.</p>
<p>So I decided to go for it.</p>
<p>Though, it wasn’t <em>just</em> Jekyll. It was Octopress.</p>
<p>To provide some context: Jekyll is a static site generated geared towards bogging. Octopress advertises itself as a plugin shell around Jekyll to make it really awesome. And it promises a lot.</p>
<p>But it did not live up to those promises, and still doesn’t. At the time, the author of Octopress had basically announced a complete rewrite of Octopress (before the previous version had particularly been finished), which was still in its early stages.</p>
<p>I was perhaps a little wary (though my ignorance at the time regarding <code class="highlighter-rouge">bundle</code> didn’t make me wary enough), but Octopress had some things that I really did like in it, such as a plugin that handled all of the Atom/RSS feeds.</p>
<p>Therefore, I went with Octopress. But <a href="https://www.rememberautumn.com/blog/2015/09/07/theming/">as I built out the blog theme</a>, I discovered that I used very little of Octopress. Its documentation was sparse, and its override system overly arcane for what I wanted to do. It seemed like Octopress had largely been built as something that you either drop in and accept the defaults with few modifications—or are the author of Octopress.</p>
<p>Needless to say, my theme did away with a bunch of that.</p>
<p>I still ended up using two Octopress plugins, though. The first would allow me to easily do link-style posts; the other would do my feeds. All was good.</p>
<p>Then Jekyll released version 3; I had been on version 2.5-something. It broke everything, because Octopress hadn’t been updated to Jekyll 3, and Jekyll 3 had changed some of the underlying APIs.<sup id="fnref:reason"><a href="#fn:reason" class="footnote">1</a></sup> This is when I created a <code class="highlighter-rouge">Gemfile</code> and tried to manage the dependencies that way.</p>
<p>But I still wanted to update to Jekyll 3 sooner or later.<sup id="fnref:update"><a href="#fn:update" class="footnote">2</a></sup></p>
<p>I therefore had two options: either wait for Octopress to support Jekyll 3; or expunge Octopress and revert to a more pure Jekyll installation.</p>
<p>While I waffled between those two options, a couple things happened. The first was that Octopress pretty much made no apparent effort to even acknowledge Jekyll 3, much less make any attempts at all to support it; there are issues that have been sitting open for literally years asking for Jekyll 3 support, with no real follow-up.<sup id="fnref:opensource"><a href="#fn:opensource" class="footnote">3</a></sup> The second was that my own work pushed me towards <a href="https://www.rememberautumn.com/blog/2016/10/19/the-power-of-simple/">more command-line solutions</a>, and I started to realize that I didn’t need Octopress for its <code class="highlighter-rouge">deploy</code> command or other chrome like that, because I could just write the <code class="highlighter-rouge">rsync</code> myself. I had no desire to dump Jekyll, but I started to embrace the idea of just rolling my own solution to things. The third was that I was starting to be more and more disappointed with the Octopress chrome I had, and how bloated it felt.</p>
<p>And then, I decided I wanted to make some changes to my templates. I wanted an archive page. I wanted to make tags more apparent and visible. I wanted to add a JSON feed.</p>
<p>Things that would require me to make changes and build stuff.</p>
<p>And that tech debt of Jekyll 2 was hanging over my head.</p>
<p>And Octopress still hadn’t made any real motion towards being compatible with Jekyll 3.</p>
<p>So, I decided it was time to expunge Octopress.</p>
<p>Expunging the <code class="highlighter-rouge">deploy</code> was easy: I created a <code class="highlighter-rouge">Makefile</code> that runs the <code class="highlighter-rouge">rsync</code> command.</p>
<p>Expunging the plugin for allowing link posts was pretty easy: I just copy-pasted that plugin into Jekyll, because it’s a standalone; I can trim it down to what I want/need later.</p>
<p>But feeds…</p>
<p>The Octopress plugin for generating feeds relies on literally the entire Octopress architecture. It’s not really just one plugin; it’s somewhere around a dozen. Some of which were also incompatible with Jekyll 3.</p>
<p>I tried to do the same thing. I tried to copy-paste the plugin in Jekyll, so I could trim it down later. I ended up doing it for the first layer of dependencies. And I just could not make it work.</p>
<p>So, dear reader, I gave up. Instead, I pulled the official Jekyll plugin for creating a feed. The downside is that it’s nowhere near as customizable, and it doesn’t support link posts well.</p>
<p>But it finally allowed me to get rid of Octopress…and reduce my blog generation time significantly.</p>
<p>It’s just that in the process, I broke the old feeds. I wonder: how many people were actually using them?</p>
<p>At some point, I might go and just do my own custom feed XML, using the current plugin as a base. Then I’d be able to do link posts the way I want. I might even try my hand at replicating what Octopress did, but without the ridiculous number of dependencies it had.</p>
<p>Yet again, I am convinced that having as few third-party dependencies as possible is a very desirable thing. I’m just sorry I broke all the feeds. But it’s not like I post so often that I need all those other ones.</p>
<p>I suppose this is, ultimately, the ultimate theme of this blog: that things always change. You can’t count on anything truly being static, because it’s all shifting and changing out from under us.</p>
<p>We’re just along for the ride.</p>
<div class="footnotes">
<ol>
<li id="fn:reason">
<p>Presumably, with good reasons. <a href="#fnref:reason" class="reversefootnote">↩</a></p>
</li>
<li id="fn:update">
<p>Why? That’s a good question. Some of it is my general desire to stay up-to-date; some of it is that the documentation is now for Jekyll 3. Some of it is just stubbornness on my part, I suppose. I can’t leave well enough alone. <a href="#fnref:update" class="reversefootnote">↩</a></p>
</li>
<li id="fn:opensource">
<p>This is a common problem among open-source projects largely maintained by one person. They build the project to fulfill their needs and release it because other people might find it useful, but if any problems that arise don’t fall under their scope of using the code, then it frequently gets deprioritized or forgotten. I’m not necessarily blaming those authors; I would probably do similar in their positions. But it <em>is</em> rather frustrating when there’s an outstanding bug in a software package you use with an outstanding pull request to fix, and the author simply says “it’s not a problem I have, so I’m not going to bother trying to fix it.” <a href="#fnref:opensource" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>Keith BertelsenThe short summary is that in fiddling with my blog, I permanently broke the RSS/Atom feeds I used to have. If you subscribed to those in the past, you need to subscribe to my new feed.That Thin Veneer2017-10-02T21:46:00-05:002017-10-02T21:46:00-05:00https://www.rememberautumn.com/blog/2017/10/02/that-thin-veneer<p>A couple of years ago, my wife and I decided we wanted to expand our family further than we already had, and we had long since come to the conclusion that our house at the time was too small. So, as many couples in that scenario are wont to do, we started the process of getting a new house.</p>
<p>We ended up with a pretty reasonable plan. A couple of months before we actually would put our old house on the market, we would get an apartment or rental house or something, and move our essential things there, and live out of there. It would give us a chance to go back and get the house ready to sell without kids or a cat messing things up; and, it would be a haven once our house sold, while we looked for a new house.</p>
<p>There are a variety of other nice things about that plan, though it also comes with the stress of multiple moves in a short time. But that’s not what I want to talk about.</p>
<p>I want to talk about the rental house.</p>
<p>Because it was pretty shitty.</p>
<p>It ended up being a rental house just down the block from our old house<sup id="fnref:awkward"><a href="#fn:awkward" class="footnote">1</a></sup>. It had two bedrooms and one bathroom, and was quite a tiny place for two adults and two kids. We were pretty sure it wasn’t built very well: just some wood and plaster plopped onto a slab. It was drafty, the electrical situation was a mess, and the sink would sometimes back up into the shower. A shower that was always way too cold for a winter morning.</p>
<p>And what really sealed the deal was the opossums. Two of them.</p>
<p>We usually left the door under the kitchen sink opened, because that’s where we put the cat’s food. A nice, private location, away from kids. But it turned out there was a small hole in the back of that cabinet, that led into the walls, and ultimately, outside.</p>
<p>So I turned the corner into the kitchen one evening, and there were two opossums, looking at me, lording over the cat’s food dish.</p>
<p>I have to give credit to the owners (a husband and wife team): they took care of them, and also dealt with the mother opossums. I also would be remiss if I didn’t indicate that the rent was very fair, and the owners were very responsive to our other issues around plumbing and such. I don’t at all want to make it sound like they were bad landlords at all, because they weren’t, and were very willing to work with us on a month-to-month basis for our situation.</p>
<p>But the rental house was still pretty shitty, and I was so relieved when I finally spent a night in the new house, and never ever had to go back there and take a shower there ever again.</p>
<p>Even while we stayed there, I kept telling myself that I need to always remember how bad it was. Because it was bad.</p>
<p>So why am I blogging about this?</p>
<p>Because nostalgia.</p>
<p>See, even now, I sometimes think back to those few months, and a bit of the haze of nostalgia floats around me. I have memories in that house—some good, some bad, as always—but memories, nonetheless. Of that being the place where I introduced my children to Studio Ghibli movies. Of games of Dominion on the cramped dining table. Even of the nights where the kids just wouldn’t stop screaming, and it being impossible to get them to all fall asleep at the same time.</p>
<p>And, sometimes, I even <em>miss</em> it.</p>
<p>But I know, beyond a shadow of a doubt, that it was <em>terrible</em>. Absolutely <em>terrible</em>. I should never want to go back there. Never want to relive those memories.</p>
<p>But they’re there, now. And as time passes, and the bad memories fade, that thin veneer of happiness has come to coat those memories with a golden sheen.</p>
<p>I think of this, now, when I hear people talk about how much they wish things were like they were in the past. Often, they think that things were better when they were kids, or when they were in college, or other such timeframes.</p>
<p>I always knew that the haze of memory makes the halcyon days of yore seem more appealing than they did to those living in them at the time. It seems a human condition, to memorialize the past and scrub off its many imperfections—and then lo, what a surprise that the imperfect present does not compare.</p>
<p>Yet I have a true, tangible thing now I can point to and see this effect in full bloom.<sup id="fnref:tangible"><a href="#fn:tangible" class="footnote">2</a></sup> That rental house was terrible. There’s no good reason I should ever want to think fondly of that time.</p>
<p>But I do.</p>
<p>That was only a couple of months. How much worse is it for those halcyon months, those halcyon <em>years</em>? The golden moments in the cracks are far more plentiful, far easier to see than the dirty stones they fill. And with time, it’s not the amount of dirty stones we see: only the golden gleam of fond memories.</p>
<p>So thus I exhort myself, and others: do not be deceived those who cling to the memories of the past. Do not follow them as they attempt to recreate that golden era, for there was truly no golden era. All they see is that thin veneer of nostalgia, wrapping the dirty stones that were the bulk of that time.</p>
<p>For me, outside of the material benefit of those couple of months, there is paradoxically one thing I can say was good about that time: it revealed this tendency to me in all its fullness.</p>
<p>May I—may we—see that veneer for what it is, and adjust our expectations appropriately.</p>
<div class="footnotes">
<ol>
<li id="fn:awkward">
<p>This created a potentially awkward situation once we sold the old house and the new owners moved in; but in practice, the overlap was short enough—and we didn’t hang around the old place much—that it didn’t quite come to pass that way. <a href="#fnref:awkward" class="reversefootnote">↩</a></p>
</li>
<li id="fn:tangible">
<p>As tangible as memories are, at least. <a href="#fnref:tangible" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>Keith BertelsenA couple of years ago, my wife and I decided we wanted to expand our family further than we already had, and we had long since come to the conclusion that our house at the time was too small. So, as many couples in that scenario are wont to do, we started the process of getting a new house.A Modern Myth2017-02-28T19:23:00-06:002017-02-28T19:23:00-06:00https://www.rememberautumn.com/blog/2017/02/28/a-modern-myth<p>I love modern versions of Classical myths and characters, and Scott Alexander does a fantastic job with it.</p>Keith BertelsenI love modern versions of Classical myths and characters, and Scott Alexander does a fantastic job with it.Day After Day2017-01-20T21:07:00-06:002017-01-20T21:07:00-06:00https://www.rememberautumn.com/blog/2017/01/20/day-after-day<p>Did you know that the length of the day depends on the length of the year?</p>
<p>It’s a bit of a surprising fact if you haven’t been exposed to it before, especially since it’s not something we particularly think about. We carry on our day-by-day without thinking about it.</p>
<p>But, when you start contemplating worldbuilding, it becomes a little more important.</p>
<p>Let’s dive in.</p>
<hr />
<p>You probably learned in school that a day is the amount of time it takes for the Earth to spin once on its axis. This is wrong.</p>
<p>Kind of.</p>
<p>Turns out, there are two different kinds of “days”, that have two different lengths.</p>
<p>The time it takes for the Earth to spin once on its axis is known as a <strong>sidereal day</strong>. You may remember “sidereal” from <a href="https://www.rememberautumn.com/blog/2017/01/12/around-and-around/">my earlier post on orbital period</a>. It’s derived ultimately from the Latin word for “star”: <em>sidus</em>, and in this instance, means “the amount of time relative to the fixed stars”.<sup id="fnref:fixed"><a href="#fn:fixed" class="footnote">1</a></sup> Sidereal year, as it turns out, means the same thing: one revolution of the Earth around the Sun relative to the fixed stars.</p>
<p>Here’s the thing: if we actually define a day by the amount of time it takes for the Earth to spin on its axis, we run into a problem: <em>it’s relative to the fixed stars</em>. Think about it. If right now the sun is directly overhead, then six months later—when the Earth is on the other side of the Sun—it will be directly behind us. So right now it’s noon, and half a year from now, it’s midnight.</p>
<p>This is absurd.</p>
<p>Though I’m hinting at the other kind of day here, a <strong>solar day</strong>, which is basically the amount of time from high noon to high noon.</p>
<p>But the Earth is going around the Sun, and in the time it takes for the Earth to make one spin on its axis, it’s moved a little on its path around the Sun, so a solar day is a little longer than a sidereal day.</p>
<p>And it’s a solar day that depends on the length of the year. The logic behind this isn’t all that difficult: the shorter the year, the farther along—as an angle—the planet is, so the farther it has to spin from a sidereal day to make a solar day.</p>
<p>So a day depends on the length of the year.</p>
<hr />
<p>A bit of an aside: there’s no way to predict an arbitrary planet’s sidereal day. It depends entirely on the angular momentum when the solar system was formed—and the interactions of all of the other bodies in the solar system since then.</p>
<p>For example, it’s thought that the gravitational effect of the moon slowed Earth’s days down a very long time ago. Based on <a href="http://www.miguasha.ca/mig-en/a_devonian_day.php">some science</a>, we know the Earth days were much shorter a long time ago—and we’re pretty sure Earth has kept the same year.</p>
<p>I’m munging the two kinds of days here, but I think you can figure out I mean solar days, since that’s what we actually tend to mean in common usage.</p>
<hr />
<p>We can do the math to relate these three quantities. Let’s call them <script type="math/tex">T_Y</script> for the sidereal year, <script type="math/tex">T_O</script> for the solar day, and <script type="math/tex">T_I</script> for the sidereal day. For simplicity, we’re going to assume a perfectly circular orbit; obviously any extremely eccentric orbit will break this, but it’s going to be close enough for orbits such as Earth’s that have a very low eccentricity.</p>
<p>Let’s start with assuming that at time <script type="math/tex">t = 0</script>, we are at solar noon with the sun, and the planet’s angle relative to the sun is <script type="math/tex">\theta = 0</script>.</p>
<p>After one solar day, the planet will have moved along its orbit. We don’t care that much about distance, we only care about angle, and it will have moved an angle of:</p>
<script type="math/tex; mode=display">\theta = T_O \frac{360}{T_Y}</script>
<p>Because we know the number of degrees in a circle, and and we know the time it takes to go around that circle, we know the angular velocity of the planet. Our angle is just the standard time times velocity to get distance.</p>
<p>We are also making the assumption that the planet is rotating in the same direction—that is, clockwise or counter-clockwise—as its orbit. This means that the solar day is longer than the sidereal day.<sup id="fnref:shorter"><a href="#fn:shorter" class="footnote">2</a></sup> So we know that the planet spins once and then a little more.</p>
<div class="figure-wrapper center"><figure class="caption-wrapper center" width=""><img src="/blog/images/2017/solarday.png" width="" height="" /><figcaption>The geometry between the planet and its sun from one solar day. Not to scale.</figcaption></figure></div>
<p>Because of the magic of geometry, we know that the angle of that “little more” is the same angle that the planet has gone around its orbit. Which means:</p>
<script type="math/tex; mode=display">\theta + 360 = T_O \frac{360}{T_I}</script>
<p>Again, we know the angular velocity of the planet’s spin, and so we can find out how much angle it’s spun in a length of time. And we know in that time it’s traced out one circle and a little more.</p>
<p>With a little algebra, then, we can determine the sidereal day for the planet based on its solar day and year length—both of which are easier to measure:</p>
<script type="math/tex; mode=display">% <![CDATA[
\begin{align*}
T_O \frac{360}{T_Y} + 360 &= T_O \frac{360}{T_I} \\
T_O \frac{1}{T_Y} + 1 &= T_O \frac{1}{T_I} \\
\frac{T_O}{T_Y} + 1 &= \frac{T_O}{T_I} \\
T_I T_O + T_I T_Y &= T_O T_Y \\
T_I (T_O + T_Y) &= T_O T_Y \\
T_I &= \frac{T_O T_Y}{T_O + T_Y} \\
\end{align*} %]]></script>
<p>I leave deriving the other two formulae as <a href="http://www.celestialnorth.org/FAQtoids/dazed_about_days_%28solar_and_sidereal%29.htm">an exercise for the reader</a></p>
<p>To double-check, let’s input Earth values, in hours:</p>
<script type="math/tex; mode=display">% <![CDATA[
\begin{align*}
T_I &= \frac{T_O T_Y}{T_O + T_Y} \\
T_I &= \frac{24 \times 8766}{24 + 8766} \\
T_I &= \frac{210384}{8790} \\
T_I &\approx 23.93447
\end{align*} %]]></script>
<p>And that is about <a href="http://www.wolframalpha.com/input/?i=23.93447+hours">23 hours, 56 minutes, and 4 seconds</a>, which is <a href="https://en.wikipedia.org/wiki/Earth">what Wikipedia says</a>.</p>
<p>Hooray.</p>
<p>Ultimately, the math behind this isn’t quite so complicated. And now you know that a day is not, in fact, the amount of time it takes for the Earth to spin around its axis.</p>
<div class="footnotes">
<ol>
<li id="fn:fixed">
<p>That is, all of the stars other than the sun. However, they’re not actually “fixed”, as it were, because everything in the universe is moving. But they move so slowly relative to the timeframe we’re working with, they may as well be fixed. And, it’s the best we have to work with. <a href="#fnref:fixed" class="reversefootnote">↩</a></p>
</li>
<li id="fn:shorter">
<p>In instances where the planet rotates a different direction, the math is a little harder, but not by much. Those situations would simply be rarer because of angular momentum and solar system creation dynamics. <a href="#fnref:shorter" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>Keith BertelsenDid you know that the length of the day depends on the length of the year?Heuristics Work Until They Don’t2017-01-13T12:15:00-06:002017-01-13T12:15:00-06:00https://www.rememberautumn.com/blog/2017/01/13/heuristics-work-until-they-don-t<p>The ending is priceless.</p>Keith BertelsenThe ending is priceless.Around and Around2017-01-12T22:41:00-06:002017-01-12T22:41:00-06:00https://www.rememberautumn.com/blog/2017/01/12/around-and-around<p>Something that has come up in my writing life is figuring out a culture’s calendar. To determine that, I need to know information about the celestial bodies nearby to the culture’s planet.</p>
<p>Arguably, my post about <a href="https://www.rememberautumn.com/blog/2016/11/26/calculating-apparent-magnitude/">apparent magnitude</a> might have been getting just a <em>bit</em> ahead of myself; I have a bad tendency to do that.</p>
<p>But I have run into a bit more fundamental of an issue: how long does it take for a smaller object to orbit a larger object? That is, a moon around a planet; or a planet around a star?</p>
<p>This is known as the <strong>orbital period</strong>.</p>
<p>Before Newton and Leibniz invented calculus, the astronomer Johannes Kepler figured it out. At least, kind of. Hopefully, we should be able to do this with just some deep thinking and some algebra and trigonometry.</p>
<p>For simplicity, we’re going to start with a small object (such as a planet) orbiting around a large object (such as a star) in a perfectly circular orbit. This will allow us to think through the problem.</p>
<p>So, let’s start with how these orbits work, which is gravity. You have a large mass, <script type="math/tex">m_1</script> that has a smaller mass, <script type="math/tex">m_2</script> orbiting around it. We know, empirically, that the force of attraction due to gravity between two masses at distance <script type="math/tex">d</script> is:</p>
<script type="math/tex; mode=display">F_G = G \frac{m_1 m_2}{d^2}</script>
<p>Where <script type="math/tex">G</script> is the <a href="https://en.wikipedia.org/wiki/Gravitational_constant">gravitational constant</a>, which until we actually need to calculate a number we can keep an algebraic symbol. Of note, <script type="math/tex">d</script> is the distance between their centers of mass, not the surfaces of the masses.</p>
<p>So at any given point in the circular orbit, we know the force of gravity between our two masses.</p>
<p>However, the smaller mass must be <em>moving</em> so that it doesn’t fall into the larger mass, and its velocity <script type="math/tex">v</script> must be large enough that its orbit doesn’t decay and therefore collide; and small enough that the orbit doesn’t escape.</p>
<p>So we need to know the centripetal force between the smaller mass and the larger mass. This is kind of a mysterious force that I struggled with back when I took physics in college, but the best way I can think of it is: pretend you have a brick on a rope that you’re swinging around your head for no apparent reason. The brick obviously wants to keep moving forward, but it’s pulled into a circle by the rope; that force is the centripetal force.</p>
<p>The formula for centripetal force is:</p>
<script type="math/tex; mode=display">F_c = \frac{mv^2}{r}</script>
<p>Where <script type="math/tex">m</script> is the mass of the object being swung around, <script type="math/tex">v</script> is its velocity, and <script type="math/tex">r</script> is its distance from the center of the circle it’s traveling on (that is, the radius of the circle). This can be derived from the standard equation <script type="math/tex">F = ma</script> and some geometry I leave as <a href="https://en.wikipedia.org/wiki/Centripetal_force">an exercise for the reader</a>.</p>
<p>Because the centripetal force must be what’s keeping the second mass orbiting, and the gravitational force is what’s keeping the smaller mass orbiting, we can set them equal:</p>
<script type="math/tex; mode=display">% <![CDATA[
\begin{align*}
F_G &= F_c \\
\frac{G m_1 m_2}{d^2} &= \frac{m_2v_2^2}{d} \\
\frac{G m_1 m_2}{d} &= m_2 v_2^2 \\
\frac{G m_1}{d} &= v_2^2 \\
\end{align*} %]]></script>
<p>If we have a circle of radius <script type="math/tex">r</script>, we know its circumference is <script type="math/tex">2\pi r</script>. If an object is traveling a circling path at velocity <script type="math/tex">v</script>, then the amount of time it takes is:</p>
<script type="math/tex; mode=display">T = \frac{2\pi r}{v}</script>
<p>That is, the time it takes to go somewhere is the distance over the velocity. Therefore, rearranging the terms a little:</p>
<script type="math/tex; mode=display">v = \frac{2\pi r}{T}</script>
<p>Really, this should come as no surprise, because this is how distance, time, and velocity are all related. But we can substitute this back in our original equation (giving us the <script type="math/tex">T</script> we want to get an equation for, as it turns out):</p>
<script type="math/tex; mode=display">% <![CDATA[
\begin{align*}
\frac{G m_1}{d} &= v_2^2 \\
\frac{G m_1}{d} &= \left(\frac{2\pi d}{T}\right)^2 \\
\frac{G m_1}{d} &= \frac{4\pi^2 d^2}{T^2} \\
T^2 \frac{G m_1}{d} &= 4\pi^2 d^2 \\
T^2 &= \frac{4\pi^2 d^3}{G m_1} \\
T &= \sqrt{\frac{4\pi^2 d^3}{G m_1}} \\
T &= 2\pi \sqrt{\frac{d^3}{G m_1}} \\
\end{align*} %]]></script>
<p>Which is the equation, as it turns out. Hooray!</p>
<p>When moving into ellipses or having the masses affect each other, you have to bring in some fancier math than I care to do, though the answer for an ellipse is the exact same, except that <script type="math/tex">d</script> is the semi-major axis of the orbit’s ellipse. With masses that really affect each other, the denominator simply becomes their sum through wizardry I haven’t derived myself.</p>
<hr />
<p>You’ll notice that in the equation I derived, the mass of the smaller object disappeared; as noted, the full equation is:</p>
<script type="math/tex; mode=display">T = 2\pi \sqrt{\frac{d^3}{G (m_1 + m_2)} }</script>
<p>But when <script type="math/tex">m_2</script> is orders of magnitude smaller than <script type="math/tex">m_1</script>, its effect practically disappears. For reference, the sun is 3 orders of magnitude more massive than Jupiter.</p>
<p>If we ignore the masses of the planets, an interesting thing happens: we can treat <script type="math/tex">m_1</script> as a constant, which means we can also pull it and the gravitational constant out of the square root. In other words:</p>
<script type="math/tex; mode=display">T = k \sqrt{d^3}</script>
<p>Or, as it’s commonly written:</p>
<script type="math/tex; mode=display">T^2 = k d^3</script>
<p>Where <script type="math/tex">k</script> is a constant that is <em>always the same for a given star</em>. This huge, and it means that we can think in terms of ratios. So if <script type="math/tex">T_1</script> is the orbital period for the first planet, and <script type="math/tex">T_2</script> is the orbital planet of the second planet, and <script type="math/tex">d_1</script> and <script type="math/tex">d_2</script> are the distance from the sun to the first and second planet respectively, we can do some algebra (an exercise left to the reader) and rearrange a bit:</p>
<script type="math/tex; mode=display">\left(\frac{d_1}{d_2}\right)^3 = \left(\frac{T_1}{T_2}\right)^2</script>
<p>And if the second planet is Earth, and you define its distance from the sun as <script type="math/tex">1</script>, and we know its <script type="math/tex">T_2</script>, if we can figure out <script type="math/tex">T_1</script> for any given planet, we can figure out how far away from the sun it is as a multiple of Earth distance.</p>
<hr />
<p>It’s figuring out how many days another planet takes to go around the sun that’s the tricky part, then. We have plenty of sky observations, but the problem is that Earth moves, so just because a planet returns to the same place it was doesn’t mean that it’s actually been exactly one year for that planet.</p>
<p>The difference between these is the <strong>synodic period</strong> and <strong>sidereal period</strong>. The synodic period is how long it takes the planet to get back to its original place relative to Earth; the sidereal is how long it takes to make one revolution of the sun.</p>
<p>If you’re thinking I’m bringing this up because there’s a way to relate the two, you’re right!</p>
<p>Let’s let <script type="math/tex">E</script> be the sidereal period of the Earth in days; we know this, it’s about <script type="math/tex">365</script> days. But we also know that each day, the Earth travels <script type="math/tex">360/E</script> degrees per day. Let <script type="math/tex">S</script> be the synodic period of another planet in days, because we can measure that. And finally, <script type="math/tex">P</script> is the sidereal period of that planet in days, meaning it orbits <script type="math/tex">360/P</script> degrees per day.</p>
<p>For simplicity, let’s say the other planet is <strong>superior</strong>, meaning it’s farther out from the sun, so we know that <script type="math/tex">P > E</script>.</p>
<p>When we measure the synodic period, we do it based on when the planet is in opposition, which means that Earth is smack dab in between that planet and the Sun. Or in other words, the planet is on the complete opposite side of the Earth from the sun. This is pretty easy to measure over the course of a lot of nights with observations at midnight each nights.</p>
<p>We know, since we’re talking about a superior planet, that the synodic period is going to be larger than one Earth year; so the difference is going to be <script type="math/tex">S - E</script>. This is how many days beyond one Earth year it takes for the planet to be in opposition again.</p>
<p>During that time, Earth has orbited an additional <script type="math/tex">\theta</script> degrees. So we know:</p>
<script type="math/tex; mode=display">\theta = (S - E)\left(\frac{360}{E}\right)</script>
<p>But because the other planet has orbited the same angle (by virtue of it being in opposition), we also know that:</p>
<script type="math/tex; mode=display">\theta = S\left(\frac{360}{P}\right)</script>
<p>We can then do some algebra:</p>
<script type="math/tex; mode=display">% <![CDATA[
\begin{align*}
(S - E)\left(\frac{360}{E}\right) &= S\left(\frac{360}{P}\right) \\
\frac{360(S - E)}{E} &= \frac{360S}{P} \\
\frac{S - E}{E} &= \frac{S}{P} \\
\frac{S}{E} - 1 &= \frac{S}{P} \\
\frac{1}{E} - \frac{1}{S} &= \frac{1}{P} \\
\frac{1}{S} &= \frac{1}{E} - \frac{1}{P} \\
\end{align*} %]]></script>
<p>And for <strong>inferior</strong> planets—that is, planets closer to the sun—we just swap <script type="math/tex">P</script> and <script type="math/tex">E</script> because Earth would have the outer orbit and the other planet would have the inner orbit, and the math still works out:</p>
<script type="math/tex; mode=display">\frac{1}{S} = \frac{1}{P} - \frac{1}{E}</script>
<p>Which means that with some astronomical observations—which we have—we can figure out how long any planet’s year is.</p>
<hr />
<p>Like I said, this is huge.</p>
<p>This is why the <strong>astronomical unit</strong> is a big deal in astronomy. An astronomical unit (AU) is the distance from the Earth to the Sun. We don’t actually need to know how far that is in kilometers.<sup id="fnref:venus"><a href="#fn:venus" class="footnote">1</a></sup> We can use our knowledge of how long a planet’s year is to figure out how many AU away from the sun it is.</p>
<p>This is why planet distances from the sun are given in AU: we’re a lot more confident of that than we are of its distance in kilometers, because its distance in kilometers depends on our measurement of Earth’s distance from the sun in kilometers. On the other hand, its distance in AU simply depends on how long its year is relative to ours—and we’re pretty sure about the distance to our sun relative to the distance to our sun.</p>
<p>The lesson here is that <em>unit choice matters</em>, and affects your accuracy.</p>
<p>Also, it explains why sometimes people pick what seems like odd units, like AU. Or parsec—but I’ll get to that sometime in the future.</p>
<hr />
<p>Anyways, this has been a bit of an exploration of orbital periods, which is a pretty cool thing, I think. Just another piece to the puzzle of building a fictional universe.</p>
<div class="footnotes">
<ol>
<li id="fn:venus">
<p>And didn’t for quite some time; we had to wait for a transit of Venus to even get close. <a href="#fnref:venus" class="reversefootnote">↩</a></p>
</li>
</ol>
</div>Keith BertelsenSomething that has come up in my writing life is figuring out a culture’s calendar. To determine that, I need to know information about the celestial bodies nearby to the culture’s planet.Towards a Conservative Christian Writer’s Manifesto2017-01-11T17:27:00-06:002017-01-11T17:27:00-06:00https://www.rememberautumn.com/blog/2017/01/11/towards-a-conservative-christian-writer-s-manifesto<p>On the theme of “writing advice”, this is good advice for fiction writers of any persuasion.</p>Keith BertelsenOn the theme of “writing advice”, this is good advice for fiction writers of any persuasion.Nonfiction Writing Advice2017-01-10T13:31:00-06:002017-01-10T13:31:00-06:00https://www.rememberautumn.com/blog/2017/01/10/nonfiction-writing-advice<p>This is from back in February of last year, but is still some fantastic advice for writing nonfiction. Particularly blogposts. He articulates some things that I’d been feeling, and gives me some things to work towards as I write posts on this blog.</p>Keith BertelsenThis is from back in February of last year, but is still some fantastic advice for writing nonfiction. Particularly blogposts. He articulates some things that I’d been feeling, and gives me some things to work towards as I write posts on this blog.Fear vs. Love2017-01-08T13:54:00-06:002017-01-08T13:54:00-06:00https://www.rememberautumn.com/blog/2017/01/08/fear-vs-love<p>While I preached <a href="https://www.rememberautumn.com/blog/2017/01/01/king-of-the-jews/">a sermon last week</a> about the Massacre of the Innocents, Nadia Bolz Weber preached a different sermon on the same passage. Hers is really good, too, so you should read it.</p>Keith BertelsenWhile I preached a sermon last week about the Massacre of the Innocents, Nadia Bolz Weber preached a different sermon on the same passage. Hers is really good, too, so you should read it.