Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 6

Author Topic: Astronomy and the Dwarven lunar calendar (with giant text display!)  (Read 44438 times)

itg

  • Bay Watcher
    • View Profile

A while back, someone posted a thread asking what to do with a captured werebeast. I suggested using using the werebeast to trigger a mechanism, such as a calendar, every month. I don't know if the guy asking the question did anything with the idea, but I decided I liked it. As it turned out, the project led to questions about what a dwarven calendar should be, and it necessitated a bit of astronomical research, which I hope to add to the wiki soon (I'd appreciate independent confirmation if anyone is willing). Before I get to the dwarven astronomy, though, let me tell you a bit (much of which you probably already know) about real-life astronomy.

As you're no doubt aware, nearly every real-world culture, past and present, keeps track of the year in terms of the cycles of the moon. As far as I am aware, the most commonly used cycle is the synodic month, the period of the moon's phases. This is also the one that's relevant to werebeasts, so it's the one I'll focus on.

In real life, we have:

  • about 365 1/4 days in a year
  • about 29 1/2 days in a synodic month
  • 12.36 synodic months in a year


Much to the chagrin of ancient astronomers, there is no easy way to fit a syndodic month (or a month based on any other lunar cycle) into a year. The ancients sure as hell tried. Take, for example, the 19-year, 235-month Metonic cycle, which is the basis of the Babylonian, Chinese, and Hebrew calendars. Some calendars, like the Hebrew calendar, feature 29-30 day months, in keeping with the natural synodic month, and add leap months every few years to keep in sync with the solar year. Others, like the Gregorian Calendar, add days to each month, abandoning the idea of syncing the calendar month with a lunar cycle. Why do I bring all this up? To contrast it with the dwarven approach to the calendar.

In a Dwarf Fortress universe, we have:

  • exactly 336 days in a year
  • 25.85 days in a synodic month
  • exactly 13 synodic months in a year


That's right. The dwarves have a year with exactly 13 synodic months, the kind of lunar cycle ancient man would have killed for, the kind of cycle that would have been cited as proof of a benevolent god for thousands of years, and the dwarves took that and came up with a calendar with... 12 months. I suppose I should have expected nothing less. However, I'm not a dwarf, so I decided to make a logical calendar, one with 13 months. I named the 13th month Slade.

For reference, here are the dates (they're the same every year) of the full moons in the "official" dwarven calendar:

25th granite
23rd slate
21st felsite
19th hematite
17th malachite
15th galena
13th limestone
10th sandstone
8th  timber
6th  moonstone
4th  opal
2nd  obsidian
28th obsidian

I'd like to add this to the wiki, pending independent confirmation.

The display

Spoiler: Granite (click to show/hide)
Spoiler: Sandstone (click to show/hide)
Spoiler: Obsidian (click to show/hide)
Spoiler: Slade (click to show/hide)

The display consists of 315 green glass bridges, or 9 5x7 characters. There are 92 characters in the names of the 13 months. With an estimated average of 13 pixels per character, and two mechanisms required per pixel, that's 2392 mechanisms. Add 630 mechanisms for the reset mechanism and a few hundred to account for all the pressure plates, hatches, and mistakes I made, and we're up to around 3,200 mechanisms used in the project. And let me say, the mechanical linking interface SUCKS. It took me about 30 seconds to create every bridge linking job thanks to all the scrolling I had to do, and I had to do all the work blind, since there's no easy way to see what is linked to what. It was only sheer stubbornness that kept me from abandoning the project, to be honest.

The font I used is Minecraftia, mainly because it was the first 5x7 pixel font I found. I altered the i's and l's to try to make them look better in a fixed-width setting.

The mechanism

Spoiler: Level Z (click to show/hide)
Spoiler: Level Z-1 (click to show/hide)

The mechanism is not nearly as complex as it looks. It's actually 13 copies of the same monthly mechanism daisy-chained together, and all the loops and stops are just there to delay the minecart a bit. To see how it works, let's look at the parts in detail:

Cerol, the werelizard



Level Z, detail



Level Z-1, detail



Cerol, the werelizard
: This guy (not a member of the fort, incidentally) is sitting on a pressure plate linked to thirteen hatches, each of which will support the blue minecart for one of the thirteen months. When he turns into a werelizard, he gains [TRAPAVOID], deactivating the plate and causing nothing of importance to happen. When he turns back, however, he retriggers the plate, opening the hatches and sending the minecart into motion.
Green arrow: When the mechanism is activated, the minecart drops through the hatch it is sitting on, runs over the pressure plate on Z-1, then takes an impulse ramp back to level Z. This pressure plate closes a hatch located in the red box. The minecart follows the loops, waiting for that hatch to close, then it hits the...
Blue box: This is another impulse ramp which ensures the minecart hits the upcoming pressure plate at high speed. Hitting the plate at high speed ensures that it either an on signal (if the bridge is off) OR an off signal (if the bridge is on), but never both. The plate is linked to the bridges spelling out the name of the month, in this case Obsidian.
Red box: The hatch in this square (which will be closed by the time the minecart gets here) is the starting point for next month. The werebeast will trigger its opening and send the cart down a functionally identical track.

If you've followed my description carefully, you've probably noticed something is missing. If the cart prints the name of the current month, then next month it prints the name of the next month, and so on. But what happened to the text that was already there? Originally, I had planned for the minecart to trigger a fairly complex reset loop, but then I realized that there was a a solution which required no extra machinery: add another minecart. If you look at the large screenshot of level Z, you'll see two minecarts, one blue and one brown. The brown cart follows the blue one, always one month behind. That means that whatever bridges the blue cart turned off (and thus made visible), the brown cart will turn them on ("erasing" them) next month.


Needless to say, this calendar is totally useless, but the werebeast-triggering mechanism could be applied in useful ways. For example, perhaps you could pasture livestock around a bridge which is tied into the werebeast system. You could set it to retract automatically every few months, dropping several of the animals down a deep shaft, exploding them for maximum yield. It should make for an efficient and fully automatic meat and leather industry. I'd love to hear some of your ideas for what to do with the system.

vanatteveldt

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #1 on: September 16, 2013, 02:40:37 am »

I take my beard off for your dwarfiness.

I still think werebeasts are scary, instead of loyal servants of the Cog...
Logged

DG

  • Bay Watcher
  • Pull the Lever
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #2 on: September 16, 2013, 02:55:09 am »

This is great, props for toughing it out during the mechanism linking interface ordeal. :)
Logged

Tarqiup Inua

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #3 on: September 16, 2013, 03:17:18 am »

So the werebeast turns each month, that's very smart, I must admit! I still have to ask whether that happens at the beginning of the month or sometime during it... though I imagine it is simply matter of fine tuning the delay to deal with that one...

It's matter of personal preference, but I would probably try to go for some equivalent of astronomical clock instead of month names, if I were you.

Good work, though!
Logged
Nuri al-Gnat - dwarven apidologist
notable works: al-Gnat's test (for determining the child snatcher's ability to pass undetected while getting stung by bees... or at least look human while at it)

Kumis

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #4 on: September 16, 2013, 03:33:15 am »

As far as I'm aware everything that happens that month happens at exactly that month (for most things at least).

That's presumably why computer locks up when we I get the message 'Spring has arrived' and my military gets rotated, and it starts raining.
Logged
Dodók Medtobór,
What are you trying to hunt?
Y u no find path?

itg

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #5 on: September 16, 2013, 03:39:15 am »

I take my beard off for your dwarfiness.

I still think werebeasts are scary, instead of loyal servants of the Cog...
This is great, props for toughing it out during the mechanism linking interface ordeal. :)
Good work, though!

Thanks!

So the werebeast turns each month, that's very smart, I must admit! I still have to ask whether that happens at the beginning of the month or sometime during it... though I imagine it is simply matter of fine tuning the delay to deal with that one...

Thanks to the new month of Slade, the transformation begins right at the end of each month and ends on the first day of the next one.

nanomage

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #6 on: September 16, 2013, 04:06:35 am »

Nice catch about dwarves using the strange 12-month calendar while a lunar one would be much more feasible in their environment!
I just want to hope that we'll have varied lenthgs of month and years and procedurally generated calendars at some point.
Also, when does the year start in your new calendar?
Logged

WanderingKid

  • Bay Watcher
  • The Overfiend
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #7 on: September 16, 2013, 04:32:22 am »

My beard is suddenly too short.   :'(

I toast you with Ale AND Rum while I eat Pig Tail Seed Roast, my good dwarf.  Not only am I impressed at the science, I am awed at the megaproject.

Larix

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #8 on: September 16, 2013, 05:54:04 am »

Wow! That's two revoltuionarily clever applied ideas in here: using the simple TRAPAVOID yes/no cycle of the werebeast as a repeater and "wedging" bridges by using a speedy minecart for the signal.

The latter's even more interesting to me - if a pressure plate is passed by a minecart, it always sends both an 'on' (raise bridge) and an 'off' (lower bridge) signal, the second precisely 99 steps after vacating the plate. Normally, that results in a bridge raising for 100 steps, then lowering again when signalled by pressure plate. But apparently, since bridges have a reaction time of 100 steps and then normally need another step to be ready to accept new input, a cart that's just fast enough sends its 'off' too early and the bridge won't recognise it and just stay raised - until the 'eraser' cart sends another signal pair, now containing a processable 'off'.

Impressive work and a very nice display. I never have the kind of patience required to pretty up displays - even very crummy displays tend to be an immense chore to link up. And improving a display by increasing resolution increases display element and link job count in a quadratic fashion.

As to the calendars - yes, i think it'd be more intuitive to follow the actual lunar cycle, but if you want to divide the year into usable subsections, twelve is a good number, since it's divisible in four meaningful ways (and the resultant 12th-of-a-year chunk of 28 days is again divisible into four units of seven days each). Thirteen is a prime number, so you get no clean subsections, and the ~26 day lunar month itself is sort of unwieldy, too: eleven of your months would have 26 and two would have 25 days, and only 25 would divide gracefully - into 5x5 days. The 26-day months would need to have a 'leap day', or you'd end up with weekday vs. cardinal number in the month rotating all over the place.

I've seen proposals for an automated calendar with twelve signals per year which simply uses a fort-owned vampire as repeater: draft them into a one-dwarf squad, define twelve burrows, each 1x1 and containing nothing but a citizen-triggered pressure plate, order the vampire to defend each burrow for one month. Consequently, the vampire will dutifully stand on each plate for a full calendar month, thanks to the magic of the military schedule. As long as the vampire is isolated from the rest of the fort and properly dressed, this calendar could tick on forever.
Logged

itg

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #9 on: September 16, 2013, 03:16:41 pm »

Wow! That's two revoltuionarily clever applied ideas in here: using the simple TRAPAVOID yes/no cycle of the werebeast as a repeater and "wedging" bridges by using a speedy minecart for the signal.

The latter's even more interesting to me - if a pressure plate is passed by a minecart, it always sends both an 'on' (raise bridge) and an 'off' (lower bridge) signal, the second precisely 99 steps after vacating the plate. Normally, that results in a bridge raising for 100 steps, then lowering again when signalled by pressure plate. But apparently, since bridges have a reaction time of 100 steps and then normally need another step to be ready to accept new input, a cart that's just fast enough sends its 'off' too early and the bridge won't recognise it and just stay raised - until the 'eraser' cart sends another signal pair, now containing a processable 'off'.

Thanks! I thought that bridge/pressure plate behavior was pretty interesting, too. It's surely something that will prove useful in the future, and it's probably worth adding to the pressure plate wiki article.

Quote
Impressive work and a very nice display. I never have the kind of patience required to pretty up displays - even very crummy displays tend to be an immense chore to link up. And improving a display by increasing resolution increases display element and link job count in a quadratic fashion.

Yeah, that display took up 97% of the time spent on this project, easily. I'm happy with the result, but it's not something I plan to do again anytime soon.

Quote
As to the calendars - yes, i think it'd be more intuitive to follow the actual lunar cycle, but if you want to divide the year into usable subsections, twelve is a good number, since it's divisible in four meaningful ways (and the resultant 12th-of-a-year chunk of 28 days is again divisible into four units of seven days each). Thirteen is a prime number, so you get no clean subsections, and the ~26 day lunar month itself is sort of unwieldy, too: eleven of your months would have 26 and two would have 25 days, and only 25 would divide gracefully - into 5x5 days. The 26-day months would need to have a 'leap day', or you'd end up with weekday vs. cardinal number in the month rotating all over the place.

All good points, of course. I was deliberately a bit harsh on the hard-coded calendar for (hopefully) humorous effect.

Quote
I've seen proposals for an automated calendar with twelve signals per year which simply uses a fort-owned vampire as repeater: draft them into a one-dwarf squad, define twelve burrows, each 1x1 and containing nothing but a citizen-triggered pressure plate, order the vampire to defend each burrow for one month. Consequently, the vampire will dutifully stand on each plate for a full calendar month, thanks to the magic of the military schedule. As long as the vampire is isolated from the rest of the fort and properly dressed, this calendar could tick on forever.

That's pretty clever, I have to admit.

EDIT (so as not to double post):

Nice catch about dwarves using the strange 12-month calendar while a lunar one would be much more feasible in their environment!
I just want to hope that we'll have varied lenthgs of month and years and procedurally generated calendars at some point.
Also, when does the year start in your new calendar?

It starts on the 1st of "official" Granite, so new year's day is the same in both calendars. The months fall out of sync as the year goes on, to the point that official Obsidian is almost entirely Slade.

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #10 on: September 16, 2013, 07:09:48 pm »

I actually rather like the way that a 13 month year, with 26 days for 11 months and 25 for 2, works out numerologically (yes, in magickal parlance), in perfect synchronicity with both lunar and solar calendars mathematically. (Even the max error in sync of 1 day for this arrangement is a neat, whole quantity!)

I may have to create a fictional mythos built around it! The potential there is incredible!

(One of the akward side effects of having studied "magic" as an aspect of human psychology, is that one ends up with a kind of cogitative dissonance, where one can see where "magic" would be applied in a circumstance, yet be perfectly grounded in objective reason and mundanity at the same time; having studied the how's and why's of magical traditions, I can comprehend the relationships those traditions attempt to create, while not actually believing in them. When such clearly phenomenal conditions appear, part of my mind creates such magical relationships, that my concious mind soundly rejects afterward.)

Having applied a little neural processing time to this set of numbers, a very powerfully profound basis for a numerological cosmology appears, rich with potentials.  Fleshing it out here would detract from the thread, but I WOULD like to point out that the indivisibility of the number 13 is NOT a fault in that respect. :D

(Today's numerologically magic numbers are: 1, 2, 5, and 13, where the number 2 is almost perfectly synonymous with raw magic, and the numbers 3, 6, and 26 have secondarily derived compound significance.)

To really make it complete, you should make slade the 11th month of the year, and adamantine the 4th.

If you guys really want to see the resulting numerologically based magical cosmology my brain seems intent on producing, I am sure we can find a way to present it. Perhaps the creative projects subforum?


*edit

Looks to me like toady's moon has an eccentric orbit. Let me see if I can calculate the eccentricity, assuming a perfectly circular planetary orbit around the star. (This would explain why the length of the lunar cycle changes slightly over the year, with the events always occuring on the same days each year.)



« Last Edit: September 16, 2013, 08:46:34 pm by wierd »
Logged

Merendel

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #11 on: September 16, 2013, 08:21:08 pm »

wow... I agree that the calendar itself is rather useless although still quite epic and an intresting bit of research.  However that latching bridge pressureplate design is pure candy.  I can think of quite a few situations where I've wanted the ability to toggle a bridge with a presure plate instead of haveing it open and close. 

Sigh I really need to get around to doing more work with minecarts to get a better grasp of them.   I don't do much with them beyond auto quantum stockpiles and guided routs at this point.  My foreys into automatic systems could best be described as over engineered exicution devices for... well whatever happens to get in the way.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #12 on: September 16, 2013, 10:40:28 pm »

The machine is neat and all, but to me, the real science is what this can tell us about the DF universe on a larger scale.

This thread, and the attempt to find the orbital type of this hypothetical moon from its orbital period data over the course of a solar year, has me wondering a few things.

Does anyone know if the seasons are reversed if you embark in the "southern" hemisphere of the map?  If so, this would give me another set of angles, and distances with which to fully trig out a dwarf fortress planetary system, (Planet, moon and star.) Because then I could calculate angle of incident of incoming solar rays, and thus the circumference of the DF planet around its equator, and also the degree of axial tilt the planet is inclined relative to its star, and the distance to the star the light ray traverses. (Assuming all the numbers are sane anyway.) From that, coupled with the orbital period information, and the average density value of the planet (in order to get 1G surface gravity) that can be derived from finding the circumference, I can compute the size and mass of the moon, and the size and mass of the star, and the distance from the star that the planet is orbiting, and their relative velocities.

This would let me know what the true orbital alignments were for this system. (And also how much of the planet is shown during worldgen!)

If the numbers all work, i'd shit a brick.

« Last Edit: September 16, 2013, 10:44:05 pm by wierd »
Logged

Merendel

  • Bay Watcher
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #13 on: September 16, 2013, 11:48:11 pm »

Does anyone know if the seasons are reversed if you embark in the "southern" hemisphere of the map? 

They are not as far as I've been able to tell.  While I dont think I've ever tried embarking on the far north or far south on the same generated world I've embarked on both northern and southern glaciers and they always started with spring on the first of granite. I sopose its always possible that this could be explained away by saying that the dwarves set their local calendar to the local seasons and have no knowlage of the far hemisphere from their location.   Because every world I've generated always goes from extream cold on one side to extream heat on the other it is somewhat logical to asume any world we gen only shows us 1 hemisphere and its possible theres a continent in the other hemisphere that we dont know about that has their first of granite on our first of limestone.   Personly I think its more likely that toady just hasnt goten around to simulating that aspect of the world yet.
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
« Reply #14 on: September 17, 2013, 12:32:01 am »

The idea would be to use anual average temperature per latitude as an analog of insolation, and thus of solar energy delivered, and angle of incident.

If we then presume a spherical planet, we can plot the "surface distance" between three measured points as arc lengths, and get the dimensions of the sphere. With the surface volume, we can then compute the sphere's net density (newton's law of gravitational attraction) for 1kg of water (earth=) to equal 1kg on the hypothetical planet.

Next up we need to determine how far away the sun is. We can get this using the pythagorean theorem, using the true distances between the sampled points on the surface, as measured against the sphere. (Gives us 2 angles and a distance. With this we can derive the 3rd corner of the triangle, and thus the other 2 lengths.) We can then compute the mass and volume of the star, based on it's solar energy output, and establish if the planet really is in the habitable zone or not.

Now that we know how far away the sun is, we can use trigonometry to derive the orbit of the moon as a ratio from the barycenter of rotation, using the time intervals between moon phases. Since we now also know the mass of the planet, we can derive the orbit, and seasonal distance from the planet, which lets us derive the moon's volume.

So, if we can get a curve for angle of incident for solar energy, averaged over latitude, with no noise from climactic modelling, coupled with the length of the year, and the synodic month, and a mean 1g surface gravity, we can solve for essentially the whole system.

I wanted to know if the months are in reverse order in the southern hemisphere to fully resolve the equator, because that would give me axial seasonal tilt as well, which would improve the confidence of the estimates.

... maybe I've been doing engineering too long, because to me, that's freaking exciting.


Logged
Pages: [1] 2 3 ... 6