Bay 12 Games Forum

Dwarf Fortress => DF Dwarf Mode Discussion => Topic started by: itg on September 16, 2013, 02:20:09 am

Title: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 16, 2013, 02:20:09 am
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:



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 (http://en.wikipedia.org/wiki/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:



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 (http://www.dafont.com/minecraftia.font), 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

(http://i.imgur.com/BvWHoG6.png)

Level Z, detail

(http://i.imgur.com/ITrmJzx.png)

Level Z-1, detail

(http://i.imgur.com/9UfbRas.png)

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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: vanatteveldt 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...
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: DG on September 16, 2013, 02:55:09 am
This is great, props for toughing it out during the mechanism linking interface ordeal. :)
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Tarqiup Inua 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!
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Kumis 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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg 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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: nanomage 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?
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: WanderingKid 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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Larix 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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg 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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd 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.)



Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Merendel 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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd 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.

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Merendel 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.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd 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.


Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 17, 2013, 05:59:56 am
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.

I have seen cold-hot-cold worlds, they're more common but not guaranteed with the larger map sizes. But yea, dwarven calendar is fixed relative to seasons, I think.


To itg: I presume Cerol the werelizard doesn't dehydrate/starve because he's not a member of the fort? Or is it the transformation that resets his/her thirst/hunger counters?

Now I'm trying to think of stuff that either the werebeast or vampire repeater could be used for. Slow execution of prisoners via once per (lunar or calendar) month repeating spikes (vampire one could actually be set to patrol back and forth over a pressure plate for a more conventional "fast" repeater), periodically dropping trash down a chute, or magma down the trash chute to burn the magma, operating an atomsmasher regularly, refilling cisterns, sending off minecarts (that have come to rest on deactivated rollers), dropping magma into a prisoner disposal pit (prisoners get automatically sent there by a minecart double shotgun or something)...

The great thing about the vampire repeater especially is that if you build a complex of various pressure plates for him to trigger (give it plenty of doors so it's easier to safely add to), you can do pretty much whatever, even doing eg. all of the above ideas, each once or twice a year.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Swonnrr on September 17, 2013, 11:20:16 am
Seasons are fixed, but tropical aeras simply have a "dry season", and a "wet season", wich could still give an idea of distance, if we consider the scorching aera to be the equator, and the freezing ones to be the pole.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Tarqiup Inua on September 17, 2013, 11:35:56 am
To itg: I presume Cerol the werelizard doesn't dehydrate/starve because he's not a member of the fort? Or is it the transformation that resets his/her thirst/hunger counters?
I can confirm this... when adventurer transforms, he stops being hungry/thirsty
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Lielac on September 17, 2013, 11:41:00 am
itg...

wierd...

you're both such geeks

-sniffle-

Thank you for reminding me why I lurk in this community. It's because you guys are all made of awesome scientific nerditude.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 18, 2013, 01:44:09 am
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.)

Both the numerology and the orbital calculations sound pretty interesting to me. Feel free to post it all in this thread, if there's nowhere else you'd rather put it.

If I were you, I'd start moon's orbit project by investigating a DF world's topology, if you don't know a lot about it already. For example, if you travel far enough east, do you end up on the west side of the map, or do you run into a wall? My money's on the second one, but I really don't know. I'm sure these questions have been answered somewhere on the forum, but if not you'd have to take an adventurer out there.

I'll also be interested to see how you handle different sized worlds. Will you treat them as different sized plots on one much larger planet, or as same-proportion plots on different sized planets?

Also, since it's a fantasy world, you could look into off-the-wall ideas like the hollow earth theory.

To itg: I presume Cerol the werelizard doesn't dehydrate/starve because he's not a member of the fort? Or is it the transformation that resets his/her thirst/hunger counters?

Both are reasons I don't have to feed him. The great thing about him being an outsider is that I don't have to worry about his feelings. Come to think of it, though, an insane werebeast would do the job just as well, so I take that back.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 18, 2013, 04:03:34 am
Ok, Without fully computing out the orbits (Weekend project!), and JUST working with the periodicity of the months and days between cycles...

here's a tentative numerological/cosmological/astronomical framework.

First up, the clearly and profoundly significant numbers, and why they are so.

(1) The number one is the primary ordinal. The fundamental unit from which all others spring. It is the mythic counter balance and origin to the indivisible number 13. (See 13). There is but the one earth, and its ending is also its beginning.

(2) This number represents mystery, the raw power of the esoteric and arcane. To fully explain why, we need to explain the rest of the cosmology, so more on that later. in a nutshell, it represents the unknown and unknowable, and equal but opposite quantities that are only distinct when viewed side by side. It has manifestations EVERYWHERE. (A left hand, and a right hand. The mirror symmetries of living creatures, and reflections in mirrors. Etc.) It is also associated with works and wonders on a cosmic scale. (there are 2 spheres in the sky, The moon and the sun, etc.)

(5) This number represents a count of days, or a cycle of measure for mortal and mundane creatures and tasks. (i'd expect a base 5 number system for ordinary tasks, like book keeping, or base 10, with special magical significance added, based on 5 and 2.) It represents physical labors, and processes. (See the section on gods and their devisions below.)

(13) This is the indivisible number of completion. A full turning of the world, and a manifestation of the divine world beyond the physical one, which reflects it.


OK then.

First up, we have a year laid out like this:

3 months with 26 days, then one month with 25. This is followed by 5 months with 26 days, and then a month with 25, followed by 3 months of 26 days. This creates a full year.

Significance, and magical thinking mode engaged:

This places the first month of 25 days on or near the spring equinox, and the second month of 25 days on or near the fall equinox. There are 2 such times of the year.

Each normal month is 5 counts of 5 days, plus one holy day dedicated to the patron god of that month. Each god has 2 axes of manifestation, and the first is celebrated in the daylight hours, and the second after nightfall. So, EG, on the month of Granite, the god of "Wealth" is represented, and on the holy day, all the pleasures of excess that wealth brings are celebrated-- but after dark, the sobering realities of poverty and the pains it brings are given religious devotions. These months all fall during times of the year when the day and the night period are of uneven lengths, as is fitting for the gods they patronize on those months. (Some align more with a positive daytime influence, and other align more with a negative night time influence, making the time spent in the devotions to each apropos to their roles in dwarven civilization and cosmology.) This is magically represented as a full count of counts of days, (5 weeks, 5 days each, representing a full cycle of toil) in observance of 1 god, and its twin axes of the celestial mystery. It is important to point out that these are the lesser gods more associated with mundane events and occurrences. (Things involving mortals, or the mechanical nature of the mortal world.)

Each month sees a cycle from full moon, to new moon, to full moon again. In this cosmology, the full and new moons are not what are considered magical. Instead, it is the 2 periods of half moon that are given significance. (This is a masterwork pigtail cloak made of master work pigtail cloth made by Urist McClothier, Masterfully dyed midnight blue with dimple dye by Urist McDyer. On the item is an image of crescent moons in pearl. The crescent moons are the symbol of the local dwarven civilization. Etc.) This is because these two cycles always occur each month, and are both equal, yet opposite, despite being identical. (Both are 1/2 moon. BUT-- One is the left side white, and the other the right side white.) The new and full moon phases are simply the extrema heralded by the 2 half moon phases, and mark the beginning and end of the month.

There are 2 months of 25 days, in which no holy day is observed. Instead, the entire month is held special, and takes place when the first period of day and night are of equal duration. Like the magical period of the half moon (which occurs twice a month), this time occurs twice a year, and both have equal periods of day and night-- but one heralds the ascent of warmth and life, and the other of cold and desolation, and conversely, the counter to their opposite, while being equal quantities. These months hold much magical significance, and are dedicated to the opposite halves of the same deep mystery. The number of days in these months is a perfect count of a count of days (5 weeks of 5 days, even) and taken together, add up to 2 counts of counts of days (50 days), dedicated to the 2 equal, harbinger gods who share a single axis of mystery. (These gods are unknown, and unnamed. It is presumed one is male, and the other female, but which is which is not known, as is appropriate for their sphere of mystery. Only standing side by side can they be discerned one from the other.)

This gives 11 mundane gods each with 2 axes of expression, and 2 special gods of mystery that occupy an obscured  single axis of power.

5 of those gods are strongly associated with beneficial mortal wellfare, which have months of devotion which align strongly with a daytime bias. (The summer months between the equinox months.) 5 of those gods strongly align with deleterious aspects of mortality, and have a strong nighttime bias. (Winter months.) At the winter solstice month, The most nighttime aligned god of mortal affairs is given devotions, The god of destruction and of fiery and bloody rebirth. (Armok, if you feel so inclined. ;)) This gives 2 counts of 5 gods, 2 gods of mystery, and 1 god of endings and origins, signaling a full turning of the cycle. (The god of destruction is also the god of creation; For through the destruction of the old is the new created, and the purpose of the new creation is to satisfy the will to destroy.) This makes 5 mundane gods of works of creation and benevolence, and 5 gods of decay and malevolence, 2 harbinger gods of equal mystery, and one god of origins and endings.  A count of celestial days of creation, and a count of celestial days of destruction, driven by 2 hands of 1 will, making an indivisible circle of 13 points.

Thus, are there 13 gods for one planet, and through the expression of one for the other, both are fully manifested in their fullest entirety.



It needs more thought, and more refinements, but it very neatly deals with all of the "problems" of the 13 month model, and paints a very vivid mythic backdrop for a very unique culture, that fits VERY well with many already existing world features. (Is it merely coincidence that there are TWO truely fantastical metals in the world, and that both are buried deep, and hold deep mysteries? How about how one is the harbinger of great fortunes, and the other of certain doom?)

Isnt magical thinking fun?

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 18, 2013, 07:08:53 pm
That's impressively well thought out. I'd follow that religion if I were a dwarf.

So, as they're currently named in my calendar, the 25-day months are Hematite and Moonstone. Maybe they don't fit as well as adamantine and slade, but you might be able to do something with them. Hematite is an iron ore, so it represents a source of steel, the quintessential dwarven metal (adamantine being sort of transcendental in that regard) and a strong symbol of industry. Moonstone, on the other hand, is purely ornamental, associated with the heavens (including, obviously, the moon), and it is pretty strongly associated with the elves in some fantasy universes. Together, the holy months represent heaven and earth, dwarf and elf, two forces which are neither good nor evil, yet they are diametrically opposed.

Hematite is one of two metal ores in the calendar, and the other, Malachite, is the next month. Moonstone is one of two gemstones in the calendar, and the other, Opal, is the month after that. Two two-month pairs. Each holy month is followed by its counterpart. Coincidence?
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 18, 2013, 07:31:31 pm
Would it surprise you that this cosmology was nearly "instantaneous" in my subconscious, after seeing the numbers?

It quite literally grabbed hold and shook my rational mind by the hair. LOL. With some refinements, it would be very eloquent, and flawless in its self-refferential beauty. Everything that makes my rational mind want to curbstomp it into oblivion. LOL.

Having a conflicted nature, and reflecting upon it in silent contemplation has some very interesting pleasures sometimes. :)
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: nanomage on September 19, 2013, 03:34:33 am
In my opinion, suggesting an eccentric moon orbit is wrong because high eccentricity would result in varying time intervals between the full moon and the new moon (which is not observed) and varying visible size of moon (which is not noted, but is likely not observed too because it would be mentioned otherwise)

EDIT: corrected some grammar
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 19, 2013, 12:30:41 pm
The eccentricity is very small, but is the only way to account for the different periods of time that some months have. (it varies by 2 days, if you actually count them.)

This means that either the moon speeds up and slows down, or the vector the moon travels changes, or both. Again, the eccentricity should not be very big. (and it has to be eccentric unless orbital velocity is exactly matched to mass. (http://www.physicsforums.com/showthread.php?t=332177) As the man in that thread points out, perfectly circular orbits are "Very goldilocks" , and that gravitational disturbances would make it not be circular anymore. Since the DF planetary system appears to lack other planets besides just the planet the dwarves and such live on, its orbit can be essentially circular, if plotted through the barycenter of the planet/moon system, and not the center of mass of the planet.  Incidentally, this would give an explanation for seasonal insolation differences without needing axial tilt at all, which would explain the curious lack of reversed seasons below the equator.

It is important that total angular momentum is conserved in such systems, but angular velocity can vary. As an orbiting body moves in closer to its companion, it speeds up-- and as it moves away,  slows down again.  A very slight ellipse would account for the discrepancy.

I haven't done the math yet, but will do so this weekend.  I think I have a better method of deriving the planet's volume worked up, using 2 points and a tangent line with an angle, where the first point is at the normal vector to the surface (90deg, at the thermal equator) and the second point is at 50% of the intensity seen at the equator on the same longitude, where sine 1/2 gives 30 degree angle of incident, and the distance between the points is an arc length. The plane through this measurement will hold the centerpoint of the sun, and the convergence of the angles of incident will define its location on that plane. That actually has fewer points to measure than the 3 points, 3 arclengths method. Though I may do both, to get a better idea of how much map distortion there is, and perhaps, derive what kind of projection the flat map is. ;) (then I could properly map a DF world's geometry onto a sphere in my favorite CAD software. :D)

Regardless, the elliptical eccentricity is required. It will only be very large if the moon is VERY massive. (The closer the moon is to being exactly identical to the mass of the planet, the more the barycenter of rotation will be out in space away from the planet's core. The smaller it is compared to the mass of the planet, the more tightly constrained to the point of the planet's center of mass it will be, and the less eccentric the orbit. By measuring the eccentricity required to get the variance in periodicity of the moon's motion, we can derive the moon's mass, and if we assume it has similar composition to the planet, we can derive it's density, and thus it's actual size.)

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Eric Blank on September 19, 2013, 01:10:03 pm
Wierd, you scare me. Quite often. I love the idea for the cosmology though, and the idea of trying to put maps of DF worlds on a sphere.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 19, 2013, 02:57:34 pm
The eccentricity is very small, but is the only way to account for the different periods of time that some months have. (it varies by 2 days, if you actually count them.)

Can you explain how you got that the periods of the months vary by 2 days? I count (by the dates I posted) 2 25-day and 11 26-day months, which is just what you'd expect from a constant orbital period of about 25.8, after you round to the nearest day.

That said, I like the idea of a very massive moon in a highly eccentric orbit. That would make for an incredible night sky. And some hardcore tides. Now that I think about it, the fact that those tides don't exist in game puts a limit on the mass of the moon, unless you'd rather just chalk it up to incomplete simulation.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 19, 2013, 03:05:55 pm
Nature doesn't "round", since it is an analogue system.  In order for the days on which lunar events occur to remain fixed year after year, the system must be precisely balanced.

Because there are 25 days between periods for some months, and 26 days for others, and still in perfect sync, then the velocity of the moon must vary. With a circular orbit, that is impossible without violating angular momentum being a constant. (Without an elliptical orbit, the moon's phases would drift slowly over time away from perfectly consistent days each year.)

In reality, you are most certainly right-- toady just truncates the value as a rounding error. But, to get the same phenomenon in an analog system, you have to be more clever. The moon needs to speed up twice a year, then slow back down.

If you want an epic moon in the sky while still conserving all the math, you just alter a simple assumtion: the density of the moon is similar to that of the planet.

So far, it looks like the DF planets are smaller, and denser than the earth. That's a no brainer, we have something akin to electron degenerate matter down in the core! (Slade). If the moon lacks slade, or has it in a different proportion, the moon will be less dense, and will need a larger volume for the same orbital profile, making much bigger in the sky, for the same distances and velocities.

Making it more mundane, like our moon, would make it quite big in volume compared to its gravitationally dominant partner.

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 19, 2013, 03:16:11 pm
Actually, I meant that the rounding is (probably) just in my list of dates. I recorded the date of the full moon every month, since that's all the game records, but I didn't mean to imply that the full moon occurred precisely at midnight on each day. In fact, I'm fairly certain, though I can't say for sure, that each full moon occurs at a different time of day. I strongly suspect that the number of hours between each full moon is constant.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Larix on September 19, 2013, 03:16:41 pm
Yeah, i can't find a 24- or 27-day month, either. That the period appears pretty much the same over the year doesn't exclude eccentricity, our own moon's time between two new moons varies between 29d 6h and 29d 20h (source: wikipedia), largely due to eccentricity of the moon's and the earth's orbits. It still averages out to ~29 1/2 days over every year.

The way the world map pans out to a plain rectangle suggests we're not looking at an actual equator and poles. The maps we're playing with could be a mere part of the world, or the whole world could be a torus. In the latter case, you should be able to 'wrap around' to the opposite end of the world by going past the edge, so clearly the world is flat. Probably a tabernacle.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 19, 2013, 03:28:49 pm
I agree that either a cylendar or the inside of a torus will translate with less distortion.

However, each has a significant problem.

The cylendar world has no thickness! There are Z levels to the world, so either Z has to be truncated/distorted, or the world isn't a cylendar.

A torus still has distortion from projection, but not as pronounced-- but it then has gravitational anomalies, and now lacks a proper day and night. (Either the sun is in the center of the torus, making it into a niven ring world, or it is a free floating torus like a halo ringworld. In either case, differences in centrepetal forces will make the effective gravity at the poles vary wildy from that at the equator, and now plotting how a moon appears in the sky becomes a lesson on cat herding.)

it's easier just to say that the DF cartographers just suck, and have inaccurate maps. ;)
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 19, 2013, 04:10:10 pm
... Since the DF planetary system appears to lack other planets besides just the planet the dwarves and such live on, its orbit can be essentially circular, if plotted through the barycenter of the planet/moon system, and not the center of mass of the planet.  Incidentally, this would give an explanation for seasonal insolation differences without needing axial tilt at all, which would explain the curious lack of reversed seasons below the equator.
...

Sure, they're not mentioned, but I don't see a particular reason that there wouldn't be other planets. In fact, current knowledge of solar system formation dynamics seems to suggest that a gas giant has a large stabilizing effect in helping habitable-zone rocky planets like the Earth to form (by protecting them from comets etc), or at least in protecting any fledgling life on them. You may be onto something with the axial tilt, but I've had a few beers and don't trust myself to think that through completely (I have studied meteorology, but very little astronomy, so...).

Disregarding the previous disclaimer, since this is too interesting not to comment on right away...  On the other hand, no axial tilt and a (nearly) completely circular orbit around the sun should lead to negligible seasonal differences, especially in the temperate zones, but actually anywhere. Especially if the mass of the planet is much larger than the mass of the moon, the eccentricity that the moon causes to the planet's orbit around the sun (since it's the combined center of mass of the planet+moon that actually orbits) just isn't big enough, if the moon:planet mass ratio is small. It might even require a pretty crazy mass ratio for that eccentricity to have any effect on seasons, to be honest. So it just seems to me that if you have seasons, you need to have them reversed on different hemispheres. Plain hot-cold maps (as opposed to cold-hot-cold) could be explained by the planet having it's rotational axis more or less pointed towards the sun, but with axial tilt/wobble causing seasons as per usual. Or just having a huge ocean on the other hemisphere that hasn't been discovered at all in the pseudo-medieval world. Think of the Americas, or Australia/the huge Pacific Ocean, and how late those were mapped.

As a final note, the moon missing planet-core materials like slade is actually a nice analogue to our moon being mostly composed of what used to be part of Earth's mantle. :)
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 19, 2013, 05:51:12 pm
Yay legends mode!

Legends mode can output a "timeless" heat map of the generated world map that is a nice greyscale image.  Sadly, it has lots of noise in it, but that's actually what you would come to expect from there being atmospheric mixing, and other climactic events going on.

Interestingly, the "large island" sample world I have selected appears to be squarely in the norther hemisphere, as the high heat energy band is at the very bottom of the world map.

I may need to do worldgens of the various types. They may generate features very differently.


*edit

Ok, after some hair pulling on the temp map spat out by legends mode, I have been able to derive a flat illumination falloff.

It looks like the 30 degree incident angle happens "exactly" 143 "large world map tiles" up from the bottom of the map. I am in the process of attempting to derive some distance units for each large world map tile. Vertical distances shouldn't be distorted, if we presume it is your typical worldmap projection style.

I am going to embark on a super tiny embark that is exactly 1x1 embark, and count the discrete tile dimensions of it, then attempt an extrapolation for scale of the big worldmap tiles.

Edit again*

The smallest embark you can make is 2x2 embark tiles. I just counted the number of tiles from edge to edge of this tiny embark, and it was 96 tiles.  This means each embark tile is 48 play tiles wide. Each world map tile is 16x16 embark tiles in size.

I will give an approximate real world distance value for 1 play tile of 1 meter. (That's about 3 feet, the width of a normal doorway.)

This means each embark tile is 48 meters tall, and each world map tile is 768 meters tall.
Our 30 degree line was drawn exactly 143 world tiles north of the equator, which places it approximately 109824 meters north of that position, as an arclength.

It is important to stress that my CAD software cannot generate a sphere that size, as it will crash my workstation. (Yes, I've tried before.....)  instead, I will scale down the sphere by exactly 1000:1 scale, so that I can generate a perfectly scaled sphere instead. This gives a 109.824 meter arclength, at 30 degrees, for a 1:1000 scale of the planet. This may actually still be too big, and I may have to scale it even smaller. We'll see.

Edit once more**

The planet has an approximate sphere radius of 104874.19494 meters.
(Earth has an approximate sphere radius of 6371000.00 meters, according to google.)

That's a whopping 1/61 size of the earth, or there abouts.

Next, we need surface gravity.

I think I will do that tomorrow.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 19, 2013, 09:59:51 pm
Mapping the region onto the resulting sphere shows what I though I would see. The world map shows approximately 1/8 of the total global surface for this worldgen.

As expected the map gets smooshed what good when mapped onto the sphere's surface.

It however looks pretty sexy otherwise.


I need to find the best way to project this map

The 45 degree measure is from the centerline of the map, to the two extrema, as mapped from the equatorial line.  The faint red line is the measured 30 degree light angle line, where solar energy delivered to the surface is 50% of what is delivered directly to the equator. The white elipse, is the equator projected around the whole sphere.

A possibly better projection would be a cubic projection, but that wouldn't have the 30 degree inclination line in the correct location.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: nanomage on September 20, 2013, 12:53:09 am
I am really sorry, but I fail to see (or I just miss) how you prove that upper and lower lines of the region are the the actual equator and pole. Why can't it start at arbitraty latitude and end at another arbitrary one?
Also, regarding your suggestion to derive eccentricity from the varying length of month: I was under the impression that the length of synodic month is constant and it's only the length of calendar month that varies. Though it's quite hard to me to say for sure without drawing charts and calculations, I believe that effect of eccentricity on the respective length of waxing/waning moon periods should be greater than it's effect on the overall synodic month length.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 20, 2013, 01:32:22 am
Insolation (http://en.m.wikipedia.org/wiki/Insolation)

I took a DF large island, went to legends mode, and explorted its temperature map.
I then averaged out the falloff in temperature from hottest latitude to coldest latitude.
The hottest latitude has the strongest insolation, and I treated it as a 90 deg angle of incident to the surface. (Straight down.) I then measured the temprature values of the resulting gradient until I found the 50% point between the extremes. As the article points out, this is the 30 degree angle of incident to the surface point, and has a sine value of 1/2. Using the measured arc-length, and the angles of incident, I generated a circle that matched that geometry. From the circle, I derived the sphere's volume.

The numbers all work out. The resulting map is exactly a 1/8th pie wedge of the computed volume of the planet, as derived from its heat map and surface distance.

If it were wrong, then the 30 degree line drawn from the heat distribution would not align at the 30 degree point of the sphere.

It does align.

The equator is indeed the bottom of this map. If you want to suppose that the equator is further south, off the genned map, then you are supposing an undefined system, where I have no methodology of getting that information. (This was the biggest size of region DF will gen) With the information I DO have, this is a valid solution, and it works out cleanly as far as surface topology is concerned.

We could do a multiple worldgen comparison, if the world generator makes worlds with a centrally located equator, and compare the heatmap gradient against the one I used, to see if the extrema change, but since the world I genned did not have that feature, I have placed it appropriately according to the math and data availale.


Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: nanomage on September 20, 2013, 02:44:48 am
Thank you wierd. I think I understand what you did, and I was just trying to understand if you already have any strict means of ruling out the hypothesis that equator is "somewhere further south". I of course agree that yours is a valid solution, and it is better than my vague assumption about arbitrary latitudes.

There are still issues with it however. One you have derived yourself and that's extremely small planet size (it's twice as big if we take Toady's assumed 2m per tile, but still tiny), and the second is that in your model, the entire top line of the map should be one actual point (the pole) of the sphere, with all distances in it's immediate vicinity being scaled down tremendously. So embarking anywhere near the top line of the map should place us roughly in the same area, and this is not the case with DF regions.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Gavakis on September 20, 2013, 05:39:11 am
Jeez.. That's cool.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 20, 2013, 01:32:21 pm
Toady has said that for minecart physics purposes, a tile was 2x2 meters, not 1x2. I don't think we have definitive dimensions in terms of SI units otherwise. I think you could safely make some other assumptions too, e.g. that the mantle and core of the planet are below hell. I.e. Dwarves can only dig about in the crust, which is only 5 (ocean) to 50km (mountains) thick on earth as well.

Each embark tile being 48x48 was known, although I'm not sure how well it's documented e.g. on the wiki.

I think it should be possible to calculate the radius (/circumference) of the planet even if you take the latitude of the hot side of the map as an unkown, as you still have a temperature gradient over a known distance. May involve calculus though, so is of course more complicated, and said latitude being 0 will indeed probably be a valid answer. Or at least a possible one.

edit: What did you assume/measure for the solar constant/how did you, in general, get from the temperature gradient to the radius of the planet? For a solar constant S0 (skipping the subscript from here on), the amount of radiation reaching the surface at any given location is (at solar noon, averaged over the year, or during the equinoxes) is Q = S*cos(y), where y = latitude, north is positive. For 2 places on the map, Q1=S*cos(y1) and Q2=S*cos(y2) must be true, and thus you can get

Q1/cos(y1) = Q2/cos(y2), or
Q1/Q2= cos(y1)/cos(y2)

So hm. You can get ratios of the cosines of latitudes. Which you have done for the case of y1 = 0 degrees and y2 = 60 degrees (insolation half of the equator's). Note that I'm using latitudes, you were using angles of incidence. With no axial tilt, the sun's height above the horizon is 30 degrees at a latitude of 60, and sin=cos(Pi/2-a), or vice versa.But what if the bottom of the map is instead e.g. y1 = 20 degrees? Then with Q1/Q2=2 as before, y = arccos(0,5*cos(20 degrees)) = 62.0 degrees (to 3 S.F.). Huh. So apparently y2 doesn't react very quickly to changes in y1. Further testing shows that eg. y1 = 60 degrees only gives y2 = 75.5 degrees.

There's still the option of what if the hot end of the map is in the other hemisphere, but I don't feel like getting into that, and it does seem unlikely.

There's still lots of stuff that we're just assuming/can be artifacts of the time/space compression, especially in fort mode. I was about to remark that we don't really know if there even is a sun (like you commented about the moon earlier), but we do at least know that dwarves do get "irritated/nauseated by the sun" if cave adaptation has set in :P. One thing that bugs me is that fort mode has no day/night cycle, for instance, so are the surface temperatures supposed to be the ones for noon, average daytime temperatures, or averaged over 24 hours?

Just hoping I got the math more or less right, it's been a couple of years since the climatology course where we did these kind of calculations. ;)
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 20, 2013, 04:18:29 pm
Since the heat map is more or less consistent in the x direction of the plot, and varies only with the y axis, i'd say it is probably "average daily".

It has a LOT of random noise, but averages out more or less cleanly. (It has a bumpy histogram.)

For reference, the final averaged extrema were 256 shade greyscale values of 4 for the top of the map, and 194 for the bottom. This means that at most, the equator could be 33% further south than the plotted position before you simply run out of spectrum, and have a max value of 255.

As for a game mode with day an night, Adv mode fits the bill.  IIRC, temperature, weather and pals are active in adv mode, and you can probe a tile for temp with dfhack.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 20, 2013, 04:34:37 pm
Since the heat map is more or less consistent in the x direction of the plot, and varies only with the y axis, i'd say it is probably "average daily".
...

Probably. But that would mean that realistic afternoon temperatures in scorching biomes would be crazy. And again, by "daily" do you mean daytime (when sun is up), or 24h? Then again, I don't think it's that much more unlikely that fortress mode just treats everywhere as being noon, or day, all the time, so the mostly constant temperature with respect to longitude doesn't really give any info on this.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 20, 2013, 10:55:42 pm
Ok, I am quite confident in my calculations now.

I have genned many many many more worlds that are large islands for cross comparison. Some have been southern hemisphere regions. Not a single one has had the equator in the middle. When stitched together, these worlds all have the same banding patterns for biomes, with a conserved equator.


The planets produced really are just that small.

I am in the process of stitching 8 such regions together (4 northern, 4 southern) to map onto my sphere to get a sample planet.

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Gentlefish on September 21, 2013, 01:19:23 am
regions or islands?
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 21, 2013, 01:20:13 am
Large islands.  I would have spent ALL NIGHT trying to gen large regions that match up cleanly.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Gentlefish on September 21, 2013, 01:20:53 am
Aha, true. I can't wait to see the outcome, this is pretty darn cool!
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 21, 2013, 01:54:31 pm
Ok, I decided to cheat, because in reality, I actually dont like math much. (Grin, Just what math can tell me, and what I can do with it.)

As such, I found a little calculator on the internet for calculating surface gravity of a celestial body, based on its density and sphere radius.  Plugging in the amended numbers (For the 2m square value given for 1 play tile, instead of the 1 meter square value I had originally estimated) gives us approximately 210 km sphere radius. (Rounded up.) This means we need 167g/cc density of the planet to achieve 1g surface gravity. The normal earth has a density of 5.5g/cc. This planet is SUPER DENSE compared to the earth. :D (It may only be 1/30 the volume, but it throws a LOT of weight around!)

The calculator also has a nifty feature, and gives the rate of gravitation acceleration at the surface, which it says is 9.8m/sec. (Anyone want to cross reference that with the large body of "Falling object" science we've done?) We might be able to derive an empirical value for surface gravity instead of the assumed 1g if we use the ACTUAL drop rate.

More interesting facts: Slade, at a density of 200000 kg/m^3,  is more dense than the core of our sun, and 15x more dense than the estimated density of the material at the earth's core.



Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 22, 2013, 03:52:12 am
Since 200000 kg/m^3 is 200 g/cc, These numbers are actually very feasible. One would assume that the core of the DF planet is mostly if not entirely slade, and the eerie glowing pits easily compensate for the fact that a solid slade planet would be too heavy.

For the record, I'll explain how the math is done. This stuff should be pretty familiar to anyone who took freshman physics, but I'll do my best to explain it at as basic a level as I can.

First some standard physics notation:

F=force, G=Gravitational constant, about 6.67×10^-11 N m^2/kg^2
M=Mass of planet, m=mass of test particle
r=radius, a=acceleration, d=density, V=volume


F = GMm/r^2     (Newton's law of gravitation)

ma = GMm/r^2     (applying Newton's 2nd law, F = ma)

a = GM/r^2     (canceling out the mass of the test particle)

a = G(dV)/r^2     (applying mass = density*volume)

a = G(d*4π/3*r^3)/r^2     (applying the formula for the volume of a sphere, V = 4π/3r^3)

a = (4π/3)Gdr     (rearranging and simplifying)

r = 3a/(4πGd)     (rearranging to solve for r)

d = 3a/(4πGr)     (rearranging to solve for d)

The last three equations are easy to use to solve for gravital acceleration at the surface (a), radius of the planet (r), and average density of the planet (d), given that you know the other two parameters.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: CaptainArchmage on September 22, 2013, 06:57:00 pm
Nice job you people have done here.

The interior of the DF planet is not entirely solid, it is full of holes, but what is the exact ratio you get between open space and filled space in the HFS?

You have a planet with a mass of 7.7584772 * 10^21 kg based on wierd's information, and the orbital year is exactly 336 days.

Edit:

Volume is 3.879 * 10 ^ 16 m^3 based on 210km radius
Density is 167,000kg/m^3
Mass is 6.48 * 10 ^ 21 kg.

The synodic month should be longer than the Moon's sidereal month, and the moon's synodic and sidereal months happen an integer number of times per year, so there are either exactly 12 (retrograde orbit) or exactly 14 (prograde orbit) sidereal months in a year, depending on the direction the moon goes around the planet. Putting my visualisation into words there is a bit difficult.

From adventure mode, the Sun rises in the East and sets in the west as normal. The following assumes that the planet orbits around the sun in the same direction as the Earth does. To determine which direction the planet rotates in relative to the orbit around the sun, you need to know whether the planet's sidereal day is longer or shorter than the synodic day. If the synodic day is longer, then the planet rotates prograde, if the synodic day is shorter, then the planet rotates retrograde.

The sidereal period is therefor either exactly 24 or 28 days. If the sidereal period is 28 days, it is because the Moon goes around the planet in a retrograde direction, and assuming the Moon's orbit is not perfectly circular (the science people have brought up says it is not), this means tidal forces will eventually cause it to de-orbit and crash into the planet.

This is the equation for semi-major axis, assuming the Planet's mass is significantly larger than the Moon's:

(T^2) / (4*pi^2 / (G*M)) = a^3 where a is the semi-major axis
M = 7.758 * 10 ^ 21 kg
M = 6.48 * 10 ^ 21 kg

The denominator is equal to 9.134 * 10 ^ -11 somethings

If prograde orbit of 24 days:

T = 2,073,600 seconds
The semi-major axis is 38,340,280 meters = about 38,340 km 35873293.02 meters = about 35,900 km


If retrograde orbit of 28 days:

T = 2,419,200 seconds
The semi-major axis is 42,489,974.79 meters = about 42,500km 40015432.33 meters = about 40,000 km

It should be possible to determine how long until the Moon crashes into the Planet in this case.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 23, 2013, 05:47:39 am
The interior of the DF planet is not entirely solid, it is full of holes, but what is the exact ratio you get between open space and filled space in the HFS?

There's plenty of wiggle room here, since there's no evidence of how deep the eerie glowing pits are. I figure we can require that the numbers make sense in the end, then use that constraint to fix the proportion of holes to slade.

Quote
The synodic month should be longer than the Moon's sidereal month, and the moon's synodic and sidereal months happen an integer number of times per year, so there are either exactly 12 (retrograde orbit) or exactly 14 (prograde orbit) sidereal months in a year, depending on the direction the moon goes around the planet. Putting my visualisation into words there is a bit difficult.

Good catch on the integer number of sidereal months. I think I can visualize it. Wouldn't that be something if Toady actually deliberately based the game calendar on the sidereal month of a moon in retrograde orbit? I wonder if there's any in-game way to determine the direction of the moon's orbit...

Quote
The sidereal period is therefor either exactly 24 or 28 days. If the sidereal period is 28 days, it is because the Moon goes around the planet in a retrograde direction, and assuming the Moon's orbit is not perfectly circular (the science people have brought up says it is not), this means tidal forces will eventually cause it to de-orbit and crash into the planet.

I'm not convinced there's any evidence the moon's orbit is not circular. As I recall, that idea was brought up to explain why the length of synodic months vary, but the all the months appear to me to be exactly the same length. Granted, I haven't done to-the-hour measurements, so there's still the possibility I'm wrong.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 23, 2013, 10:49:17 am
The interior of the DF planet is not entirely solid, it is full of holes, but what is the exact ratio you get between open space and filled space in the HFS?

There's plenty of wiggle room here, since there's no evidence of how deep the eerie glowing pits are. I figure we can require that the numbers make sense in the end, then use that constraint to fix the proportion of holes to slade.

Quote
The synodic month should be longer than the Moon's sidereal month, and the moon's synodic and sidereal months happen an integer number of times per year, so there are either exactly 12 (retrograde orbit) or exactly 14 (prograde orbit) sidereal months in a year, depending on the direction the moon goes around the planet. Putting my visualisation into words there is a bit difficult.

Good catch on the integer number of sidereal months. I think I can visualize it. Wouldn't that be something if Toady actually deliberately based the game calendar on the sidereal month of a moon in retrograde orbit? I wonder if there's any in-game way to determine the direction of the moon's orbit...

Quote
The sidereal period is therefor either exactly 24 or 28 days. If the sidereal period is 28 days, it is because the Moon goes around the planet in a retrograde direction, and assuming the Moon's orbit is not perfectly circular (the science people have brought up says it is not), this means tidal forces will eventually cause it to de-orbit and crash into the planet.

I'm not convinced there's any evidence the moon's orbit is not circular. As I recall, that idea was brought up to explain why the length of synodic months vary, but the all the months appear to me to be exactly the same length. Granted, I haven't done to-the-hour measurements, so there's still the possibility I'm wrong.

- Indeed, there's wiggle room, while at the same time some data to base the proportion off (you could count how many/how many tiles of eerie glowing pits there are per embark square, on average; similar estimates have been made for curious structures and candy spires in the past)

- The calendar being based on sidereal months is very compelling. So compelling, that I'd say that the 12-month calendar is in itself probably the best evidence for the retrograde orbit. I think that because there are no tides(?), the only thing in-game based on the lunar phases are werebeasts. This also means that dwarves/at least one of the other civilized races is at least decent when it comes to astronomy (looks at the moon's location relative to fixed stars, instead of just at it's phases). An invention made in antiquity in the real world, but still.

- Lastly, What little I do know/remember about orbital dynamics is that no system with more than 2 orbiting masses is ever really perfectly circular; ellipses or anomalies of some kind are the norm. So at the very least, the phrase you should be using is "(not) effectively circular", or something to that effect.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: CaptainArchmage on September 23, 2013, 01:08:37 pm
The orbit of the moon would not be circular at least because of the Sun's gravitational influence.

As I pointed out, if the Dwarf Fortress planet orbits the sun retrograde, the moon could be orbiting the planet prograde. We would need to have some way to determine whether the planets sidereal day is longer or shorter than the synodic day.

I think the 28-day lunar orbit fits better with the dwarven months.

The moon crashing into the planet might be a good apocalypse scenario later on in the game. It may have been planned when the moon was put in. Has the moon been around since 23a?
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 23, 2013, 04:29:20 pm
- Lastly, What little I do know/remember about orbital dynamics is that no system with more than 2 orbiting masses is ever really perfectly circular; ellipses or anomalies of some kind are the norm. So at the very least, the phrase you should be using is "(not) effectively circular", or something to that effect.

I thought it was understood that when I said "circular orbit" I was making an idealization. That's standard practice for physics problems. Considering that wierd's calculation for the radius of the planet relies heavily on some huge assumptions (for instance, that the world is round, despite all appearances) and is at best an order of magnitude estimate, the tiny effect of the Sun's gravity on the moon's orbit will make up an infinitesimal portion of our total error. None of this is meant to take away from wierd's work, by the way. He's done a great job, but there's no clean way to turn the flat world of DF into a sphere.

One more thing: We can in principle measure the stability of the moon's orbit from year to year by keeping tabs on the dates of the full moons. If the moon spirals inward or outward at all, the length of the month will show it. I bet the months stay exactly the same length, year after year, even if you somehow make it to year 2 billion. I guess my point here is that we should assume the physics of the DF universe are simplified (In fact, we know this), so it's entirely possible and in fact likely that the moon's orbit is exactly circular.

The orbit of the moon would not be circular at least because of the Sun's gravitational influence.

As I pointed out, if the Dwarf Fortress planet orbits the sun retrograde, the moon could be orbiting the planet prograde. We would need to have some way to determine whether the planets sidereal day is longer or shorter than the synodic day.

I think the 28-day lunar orbit fits better with the dwarven months.

The moon crashing into the planet might be a good apocalypse scenario later on in the game. It may have been planned when the moon was put in. Has the moon been around since 23a?

I agree that would make a good scenario (Majora's Mask, anyone?), but I seriously, seriously doubt it was planned. It's just possible that Toady intended the calendar to be based on sidereal months, then calculated the dates of the full moon based on that (the other likely possibility being that he arbitrarily put 13 full moons into the year because the full moons aren't "supposed to" line up perfectly with the calendar months), but the rest of this is just an entertaining exercise.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 23, 2013, 04:57:13 pm
Agreed.

If I could get accurate "at equator" temperature measurements over time, I could better resolve the diameter of the equator, and possibly solve for other possible topologies, such as elipsoids or toroids.

However, the temp map given by legends mode is "timeless", and appears to be "average daily" temperatures. I need a plot showing temperatures over a 24/hr period exactly on the equator, for several days, to constrain the topology for such calculations. (The current method only gives longitudinal curvature. Getting say, a week of "hourly measurements at equator" would let me compute in the other direction as well, refining the results.

This would let me know if we are dealing with a "niven style" ringworld, or a "halo style" one, etc.

A toroidal "planet" would lay down much better than a spherical one, just that I lack enough data to constrain its dimensions.

That we could even solve for a sphere, given the very limited data available, is pretty spectacular.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 23, 2013, 05:03:44 pm
Does temperature change based off the day/night cycle in adventure mode, or is it just constant regardless of the time of day (or night)? Because if it does change, I'd guess it's a fairly straightforward model, eg. regular or triangular sine wave, that's the same all across the world. But that would have to be verified too, of course. The point is, that would be a possible source for data.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 23, 2013, 05:20:41 pm
Unknown. I don't usually play adv mode, and suck at it so horribly that I have no real interest in it.

I do know that temperature calculations are active, etc, but I don't know if DF computes a change in temp over a 24hr period or not in adv mode.

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 23, 2013, 05:58:30 pm
I just did a quick test, and I can confirm temperature does change with time of day in adventure mode. It seems to work as you'd expect, getting warmer in the afternoon and cooler at night. Hour-by hour measurements will have to wait until later, though.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: CaptainArchmage on September 23, 2013, 05:59:19 pm
Unknown. I don't usually play adv mode, and suck at it so horribly that I have no real interest in it.

I do know that temperature calculations are active, etc, but I don't know if DF computes a change in temp over a 24hr period or not in adv mode.

It does, based on what I've heard. People report rivers freezing at night and thawing at dawn.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 23, 2013, 06:19:44 pm
Then that is very exciting. We could conduct 1 week observations on several worlds (to flatten rainshadow and weather biases) to get a threshold for insolation falloff over time, and thus derive equatorial curvature as well as the previously derived longitudinal curvature. We could then determine if the planet is an elipsoid, a sphere (with certainty), or the inside of a torus (and how big.)

A torus solution would introduce the least distortion at the "polar regions" on the map, because it would resolve as a line, and not as a point. It would however, make orbital calculations..... "quite interesting".

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 23, 2013, 06:40:20 pm
I think it's also worth considering, depending on how the temperature data turns out, alternative ways to project the flat map onto the sphere. For example, instead of squishing the map near the north pole to make a triangle-shaped region, you could leave it square-shaped (think barcode sticker on a golf ball). You'd lose tileability, but that's merely a convenience for rendering.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 23, 2013, 06:55:32 pm
That would be a "cube map" projected onto a sphere, and would be 6 identically sized regions per planet. Sadly, the curvature data from the first iteration says this can't happen, otherwise the insolation falloff zone won't be right. (At least for a sphere anyway!)

That may not be the case for an elipsoid, where equatorial curvature is less than longitudinal curvature. (Sphere that's been "mooshed" down at the poles.) That would result in a longitudinal curvature that is a parabola, and not a circle, which would place the 30 degree insolation latitude at a different position on the solid. ;)

Again, I need data for equatorial curvature, and I can only get that from manual adv measurement sets.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 23, 2013, 07:08:55 pm
It's only a cube map if you insist it be one. Imagine taking one of those identically-sized regions, shrink it 20%, and shift its position on the globe a bit. Now you've got a square region that doesn't tile. That may or may not be useful, but the point is that it gives you more options in terms of finding a projection which is compatible with gameplay. The Triangle-shaped region is not, because you can embark at two different sites near the north end of the map and they won't overlap.

There's also a possible compromise: a trapezoid-shaped region.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 23, 2013, 07:17:51 pm
Agreed.. but the insolation values still need to jive with the topology you are laying it down on. There could be large "circular" zones at the top and bottom of the world that aren't displayed on the world map, but the curvature of the body has to allow that. (Again, "mooshed" sphere, or a torus.)

The ratio between the curvatures will define the topology. :D
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 24, 2013, 05:23:26 pm
So, who's making the temperature-surveying adventurer? (I've never tried adventure mode, so... yea. Not me.)
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 24, 2013, 05:44:16 pm
I'm willing to do it, but it will probably have to wait until the weekend. To really do it right, we should get data from different biomes, the same biome at different latitudes, and different worlds. Ideally I would do one world, and a few other people would make the same measurements on their own worlds.

For what its worth, you (or anyone who wants to join in the fun) could mod the game a bit to play as a bronze colossus, if you want to make surviving the adventure a (nearly) sure thing. I haven't tried this, but here's a post with plausible-looking instructions: http://www.bay12forums.com/smf/index.php?topic=131113.0 (http://www.bay12forums.com/smf/index.php?topic=131113.0)
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 24, 2013, 06:00:08 pm
Ideally, the 2 best places to perform the measurements are at 60deg north, and 0 deg latitudes. Those are fixed points on the temp falloffs from legends mode, which very consistently fall the same number of world map tiles apart. This gives the length of curve #1.

Since we are wanting a ratio against curve #1, we should measure temp falloff over time at those two locations. This will give us the second length. (How many world tiles move right before 50% illumination occurs.) If the curve ratio is 1:1 at the equator, then the planet is a sphere. If the first one is longer, then the planet is an egg_shaped elipsoid. If the second one is longer, then it is a pancaked elipsoid. If the second one is WAAAAAAAAAAY bigger than the first one, then the planet is a torus.

Getting the "3rd curve" at the "60 degrees" line will further constrain the surface, because we can compare the lengths of time and total temp falloffs there too, and the distances between.

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 29, 2013, 01:49:56 am
I've started doing hour-by-hour temperature measurements in a new large world. Here's how I'm conducting the measurements.


(http://i.imgur.com/witLjjC.png)


This is Catig Strangleforded, the flying bronze colossus climatologist. I'll be sending him to interesting locations around the world to measure the temperature. The plan is to wait until dawn, read the temperature with dfhack's probe command, wait one hour, probe, etc.

To start, I chose to measure the temperature at the southern edge of the map, which is 100% ocean in this world. There were some frustrating technical issues. When crossing the ocean, there was a 5-10 second lag spike every 3-5 seconds, so in the end I had to tape down the DOWN key and walked away for a while. To use the wait command, I had to use tiletypes to make a solid platform to stand on. After waiting, the platform would disappear, and I would find myself half a screen from the map's edge. To move back to the edge, I had to endure another 10 seconds of lag each time, then I had to remake my waiting platform. Due to these inconveniences, I only tooks two days worth of readings. Here's a plot of the data:


(http://i.imgur.com/5tXKLUz.png)

Spoiler: Raw data (click to show/hide)

Hour 1 is dawn. Values on the graph are actually temperatures in Urists minus 10,000 U. For example, a temperature of 10,038 U will be displayed as 38.

As you can see, the data was pretty much the same on both days. The graph is surprisingly asymmetrical. The temperature rises relatively slowly and non-linearly in the morning, but falls quickly and linearly in the evening. The temperature plateaus in the afternoon and night, but the night-time plateau is almost twice as long. It will be interesting to see if this pattern hold in other regions, as well, and even more interesting to investigate why the temperature should behave this way.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 29, 2013, 12:27:44 pm
If you are measuring water (and not the temp of your platform), then the specific heat of the water is likely the culprit. Toady *does* use specific heat values for materials in his calculations.

That this is water actually helps us to determine how much radiation is hitting the surface. (It takes approx 1 joule energy to raise 1 cc of water 1 degree celcius, if I recall that right. I will look up actual exchange rates later.) Very good that it is so consistent on its distribution. The plateau effect at night makes sense. The oean is deep, water mixes and sloshes around, and tempurature calcs work much like fluid flow calcs. While the upper surface of the water is getting heated, it mixes with deeper, cooler water. Water has a pretty steep specific heat, which means it holds heat quite well once warmed up. At nightfall, the water starts cooling on the surface, but all that deeper water it was mixing with during the day will still be quite warm. Mixing with that deeper water homogenizes the temperature. Planet-wide, the degree of insolation falls off the further from the equator you get, so polar latitudes favor cooling, which balances the equitorial region's favoritism toward heating. This is what drives deep ocean currents and weather patterns they cause.


However, we need to take the same measurements many places along the equator to fully silence any biases that might exist.

A better sinusoid curve should appear over a desert. Try generating a large region instead of a large island. It will have a chance of producing land at the equator.

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 29, 2013, 03:51:53 pm
Actually, I was measuring the air temperature above the water, but the temperatures of the air, water, platform, and ocean floor were identical every time I measured all three. According to my measurements, altitude and water depth have no effect on temperature, either.

I suspect Toady uses a much simpler model for temperature calculations, where every tile which sees the sky obeys a single biome-wide climate model. That model may or may not be based on/inspired by real-life data. If specific heat is a factor at all, it probably effects the speed of temperature changes, and that difference may not be significant at the scale we're interested in. That is, it may be that air and water may differ in temperature for couple of in game minutes, but water "catches up" quickly, and the momentary discrepancy has no cumulative effect.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Loud Whispers on September 29, 2013, 04:04:40 pm
I must say, I am quite impressed and also disappointed that I never took my shambled lunar speculations quite so brilliantly as this.

However, there is one thing that puzzles me...

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.
Since all of the Dwarven months are listed by material, couldn't you have substituted the massive blob of mechanisms for a hatch covering a row of materials, each representing a month?
I imagine invading the damned depths would have been less time consuming in order to reach precious usable slade than constructing this fine piece.

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.
But it does accurately mark when a werebeast transforms at least?
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 29, 2013, 04:46:29 pm
I must say, I am quite impressed and also disappointed that I never took my shambled lunar speculations quite so brilliantly as this.

However, there is one thing that puzzles me...

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.
Since all of the Dwarven months are listed by material, couldn't you have substituted the massive blob of mechanisms for a hatch covering a row of materials, each representing a month?
I imagine invading the damned depths would have been less time consuming in order to reach precious usable slade than constructing this fine piece.

It would hardly be a megaproject if I did something so sensible and modest. That said, the reason I spent so much time on that display is mainly that by the time I realized, "Oh crap, this is going to take weeks," I was far enough in that I didn't want the work I had already done to go to waste.

Plus, Felsite doesn't exist in this version.

Quote
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.
But it does accurately mark when a werebeast transforms at least?

It marks it accurately in the sense that it happens at exactly the same time each year, but the calendar actually updates about halfway through Granite 1, due the fact that the werebeast transforms back after the new year. Also, the calendar takes a few hundred ticks to process the signal. These minor shortcomings could be overcome by hooking the werebeast's plate to a signal inverter (so it activates the calendar when transforming into a werebeast) and a well-calibrated delay circuit.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on September 29, 2013, 06:37:35 pm
wierd: A Joule (J) is 1 kg * m2 * s-2. You're thinking of calories: 1 cal is about 4.2 J, 1 Cal or kcal about 4.2 kJ.

Also, I'm kinda skeptic about some of your claims about the plateaus making sense. Ocean water is pretty stratified, with only limited mixing between layers. For a very simple model, heat is transferred between layers and between the surface&atmosphere by heat transfer rate being relative to the temperature difference (for pure blackbody radiation/absorption, it would actually be the Stefan-Boltzmann law i.e. the difference between the 4th powers of the temperatures), so that cooling/heating is always fast at first and then slows down.

Well ok, the plateau makes sense, since the later slow cooling/heating could indeed look like a plateau, but it should be symmetric, not asymmetric as with the data. The plots look more like heating is just turned off at dusk, and the temperature drops linearly, as itg said. Also, whereever the measurements were made, it was (or should have been) summer at the time, since dusk occurred 16 hours from dawn. Also, on Earth, a daylight duration of 16 hours at summer solstice corresponds to roughly 48 degrees North/South. Which is a bit south of Paris, about the same as Munich, Vienna, Ulanbaatar, or a tad North of Seattle. Or about 150km South of New Zealand's South Island (pretty much open ocean all around the Earth, with the exception of southern Argentina/Chile).


Since insolation follows a sinusoidal curve over the day, I'd claim that average daily temperatures (so excluding weather effects, which DF doesn't have AFAIK) are also nearly sinusoidal, e.g. with this plot of water temperature over a year (the yearly plot is analogous to a daily one, which I had trouble finding just now).
Spoiler (click to show/hide)

What the large heat capacity or specific heat capacity (2 different things) does is delay the increases/decreases in water temperature compared to the insolation maxima/minima: solar heating is at it's smallest at the end of December, and at it's greatest at the end of June, and yet in the above "warm" coastal area water temperature plot, the sea water reaches it's temperature minimum in late January/early February, and it's maximum some time in August. The greater the specific heat capacity of the material, the bigger the delay. And if we include mixing/conduction of heat deeper into the material, the heat capacity and thus the delay grow. A sand desert (which also transmit heat downwards into the earth really badly, IIRC) would react quickly to changes in solar heating, both over the day and over the year, whereas oceans are pretty much the slowest thing to do so found on earth (possibly beaten at times by moist forests, both tropical and temperate).

So, from the data we know that:
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 29, 2013, 10:30:39 pm
Awesome, thanks.  I couldnt remember what energy unit it was. (Why DO we have so many energy units anyway?)

The estimated insolation values for daily heating periods is definitely of interest. Looks like some very interesting geological phenomena would occur at the equator under such temperatures, when mixed with a water rich atmosphere.

The planet would be considerably larger than earlier calculations, and would be much closer to its star. That means perturbation of the moon's orbit would be greater as well.

The DF planet is looking considerably less habitable. :D

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 30, 2013, 12:13:50 am
Since sand deserts came up in the discussion, I decided do the next set of measurements in the nearest desert region. I found a nice one not far from the southern tip of the nearest land mass, probably about 10% of the way to the north pole. Later, I'll try to put together a map with the measurement locations marked on it. I did three days worth of measurements this time. It appears the temperature curve ought to be identical from day to day. The small day-to-day differences were caused by bandit attacks, which threw off the timing of subsequent measurements.

(http://i.imgur.com/A1Osxrk.png)

Spoiler: Raw data (click to show/hide)

Readings were taken starting on the 16th of Malachite (official calendar). Bandit attacks occurred on hour 9 of the 16th, hour 15 of the 17th, and hour 9 of the 18th. The temperature data looks similar to the ocean biome data, but the temperature plateaus are closer in length. Both regions reached maximum temperature 8 hours after dawn, but the desert stayed at max temperature one hour longer than the ocean did. The cooling period took the same number of hours in both regions, so the ocean biome had to spend longer at the low temperature plateau. Is the difference between the temperature curves due to biome or to latitude? More measurements will tell.

By the way, the ocean measurements were taken on the 11th and 12th of Malachite (official calendar).
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 30, 2013, 06:13:07 pm
The lack of a sinusoid over the desert is practically impossible to handwave away. Either the atmosphere has some bizarre polarization effect going on, or the temperature modeling is simply broken. 

In this case, i'd say the temperature model is broken.

This means using it as originally planned is ...... now rather complicated.

Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 30, 2013, 08:14:03 pm
I'm not sure it's all that weird. If you'd ever lived in the desert, you'd know the temperature really does tend to plateau in the afternoons. Take a look at this hour-by-hour data (http://www.wunderground.com/history/airport/KPHX/2013/6/16/DailyHistory.html?req_city=Phoenix&req_state=AZ&req_statename=Arizona) from June 16th in Phoenix, AZ. Take a look at some of the surrounding days, too. The graphs aren't nearly as regular as the DF graphs, but there's a clear tendency to heat up to about 105° F and hang there for around 6 hours. Although the night time data on the 16th of June looks more sinusoidal than flat, there are plenty of other days with clear night time plateaus, too. Like this one. (http://www.wunderground.com/history/airport/KPHX/2013/7/27/DailyHistory.html?req_city=NA&req_state=NA&req_statename=NA)

I picked these examples more or less at random, by the way. They are typical of the dozen or so dates I scanned.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 30, 2013, 09:04:35 pm
well, if we just *ignore* the nighttime plateau issue, and just look at daytime temperature variations alone as a normal distribution, then we can abuse some rules of statistics to smooth the curve out.

That's really bullshitty though.

It would allow us to get an estimated period for daytime exposure though, which could then derive as a rotational velocity, and thus derive distance. That would give us half the theoretical circumference of the longitudinal circle where the temperature measurement was taken, and thus be useful. (But again, we would be discarding the nighttime data wholesale.)

Unfortunately, my brain is very unhappy with where that can lead... the "best" topology will probably be non-euclidian, on a complex coordinate system. The second best probably a halo type ringworld with very fast rotation. (The first one is only explicable mathematically.)

The first option explains the difference in light levels at different "longitudes" using an imaginary spacial axis (not a time axis! An actual space axis.) The light travels more distance through the imaginary axis at higher (or lower) latitudes, but te world this otherwise a cylendar when viewed in 3 dimensional space. This is why the map doesn't get distorted, while still being colder the greater the distance from the equator.

The second one helps explain the plateau in night time temperature, but has issues with curvature based distortion of the map. Basically, the surface at night is always seeing the the sunlit side of the torus, because the torus is inclined to the plane of the ecliptic by some angle. (That means it is getting lots of reflected light, even at night!) This explains why the energy at the equator is what it is (angled to ecliptic), and It may also explain the seasonal variation as well. (Rate of precession is exactly matched to yearly orbit, so that total angle of pointing is always on the same vector.) However, this makes a twice per year period where the torus eclipses both surfaces, making it totally nighttime, which does not happen in game. A possible solution comes from making the "moon" into a gas giant, which the ring world is orbiting in a very peculiar way. (But it makes the southern hemisphere always colder than the northern one.)

In this case, we have the same inclined torus, orbiting transversly to the to the plane of the ecliptic, around a large gas giant with its rotational pole aimed at the star (like uranus), in a slightly tilted orbit in relation to the planet's plane of rotation.

This means that the surface of the ring world will see variations in the amount of lit surface of the gas giant it is orbiting, as it moves "above" and "below" the plane of the planet's rotation. It does not go into the planet's shadow. This movement also alters the ringworld's insolation value, because it moves farther away from the sun as it transits the planet's rotational plane, then coser again as it transits the second time. This would explain the perfect synchronicity of the "planet's" year with the "lunar" cycle. The ringworld is orbiting the moon, not the other way around, and that orbital cycle is what creates the illusion of the "year".

The actual solar transit period of the gas giant's year may be considerably longer.

Illustrations may help with this. I'll see what I can come up with.






Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on September 30, 2013, 09:20:59 pm
I'd love to see what you come up with as far as ringworlds and non-euclidean planets, but I'd also love a more detailed explanation of why you think it's necessary to go there. I mean, even if we agree that there's something wrong with the DF temperature dynamics, and I'm not sure I do (the desert temperature graph, at least, is qualitatively similar to a typical real-world one), wouldn't weather patterns be the natural place to go next? And why demand that DF temperatures behave a certain way, when Earth temperatures don't even behave that way?
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: wierd on September 30, 2013, 09:55:28 pm
In order to derive angle of incident at a given time interval, we need a uniform curve over the daylight hours. (Morning and afternoon fall off cleanly on either side of noon.) Otherwise, we need a complex orientation to the sun to account for the sharp fall off. I can get that (I think) with a ring world cocked at a funny angle. That would let the evening side be slightly more sunward, and fall off more sharply than the morning side, and would allow the midday energy curve to stay plateau shaped regardless of latitude.

It also explains the incline snaake(?) Derived for previous insolation estimates, without making the planet hugely bigger, and making the equator hotter than death valley on its coolest days.

It also forces the lunar cycle to match the yearly cycle automagically, and keeps map distortion at the polar regions at a minimum.

It isn't just the temperature data that is involved.

OK, unvalidated mental picture time.

(http://i186.photobucket.com/albums/x248/wierdw/ORBIT_EXAMPLE_zps440334b7.jpg)

Sorry if this is blurry. Photobucket hates bmp files and makes them jpegs, and does bad things. I usually use png, but was in a hurry.

Here we see the basic layout of the system. The sun's axis is straight up and down. The gas giant "moon" orbits the sun counter clockwise. Its axis is always pointed directly at the sun. The ringworld orbits the "moon" prograde. The ringworld's orbital path is inclined from the planet's plane of rotation. (Not easily seen. The two look the same direction at this angle of view. Sorry.) The ringword itself has an axial tilt against its orbital plane, so that its pointing vector always stays at a fixed angle to the star. It rotates counterclockwise on this tilted axis. This axis is tilted in 2 angles of direction, so that the evening side of the ring is more sunward than the morning side, which causes the "plateau" on daytime temperatures ring-wide, and makes evening insolation fall more sharply than daytime. The difference between morning and evening curves should be complimentary of the ideal sinusoid curve. (Unchecked.) At night, the daylight side of the ring will yawn brilliantly overhead, and will reflect considerable nighttime light on the surface, reducing the rate of cooling all night long. The inclined orbital path of the ring in regard to the gas giant makes it take a kind of "spirograph" orbit. The completion of each node of the spirograph is a lunar month, and the completion of the whole transit is the year. The solar year of the gas giant is moot.

Here we see the mental sketch on the side, better showing cocked angles.
(http://i186.photobucket.com/albums/x248/wierdw/orbit_example2_zps9754b4af.jpg)

Until I (or somebody else) does the math, this is conjectual, and should be viewed as exactly that.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: itg on October 01, 2013, 03:26:15 am
Pictures look great. I'll have to think about this later. In the meantime, here's temperature data from a second desert, a day's rampage north of the first one:

(http://i.imgur.com/DzQ2eEN.png)

Spoiler (click to show/hide)

This is data for the 20th of Malachite. As there was no interference with the measurements, for a change, I only had to do one day's worth. No surprises here, but, in addition to the plateaus, this is the third location out of three with a "hump" in the curve at hour three. At this point, I'm comfortable saying that hump is clearly a feature of DF's temperature model, not an artifact of my measurements.
Title: Re: Astronomy and the Dwarven lunar calendar (with giant text display!)
Post by: Snaake on October 01, 2013, 09:30:27 am
...
So, from the data we know that:
  • There are set "target" maximum (daytime) and minimum (nighttime) temperatures.
  • Heating is either sinusoidal or logarithmic, but cooling is linear.
  • Daylight hours are a bit whack; if the hot edge of the map gets 16 hours of daylight, even if it's only at the summer solstice, that would mean the equator is actually still quite a ways off, and probably quite !!FUN!! (what's called a scorching desert in DF would probably feel refreshing after a walk at the equator).

I realized some erroneous assumptions/conclusions in my previous post (the short list of conclusions is above, but there's some other stuff too). First of all, cooling in itself isn't necessarily linear, but the effect of lower insolation late in the day (as the sun is setting) and the cooling has a total effect that looks linear. Or my new guess is that maybe the sun sets at around 13 hours of daylight (the cooling isn't completely linear before that, showing that there could still be some small heating), after which cooling is linear as speculated earlier. So the daylight hours are also a bit shorter at the South map edge, but still about an hour longer than expected for the equator, which should be a few minutes over 12h year-round (google e.g. "length of day Quito" or Singapore or something, check January&June). Also found this (http://astro.unl.edu/classaction/animations/coordsmotion/daylighthoursexplorer.html) nice visualizer. 13 hours at summer solstice corresponds to about 17 degrees north, which would mean that the equator would still be somewhat habitable: at worst, only about as bad as the existing scorching climates.

As a side note, It's kinda annoying that the plateaus are so big, with enough accuracy (1 degree F or U should be enough, I think), there should be a curve visible over the whole day, or at most a couple of hours of even temperatures. In real life, you need averages e.g. off the same day every year for several years to get rid of weather effects, of course. Also, lack of a clear peak/trough means it's harder to pinpoint what kind of delay specific heat capacities introduce to the system.

Readings from a desert/rocky badland vs. ocean on the same latitude would be interesting, since it might help isolate the effects of latitude vs. surface material. The desert reading definitely suggests my "target temperature" claim from the quote above, since barring statistical flukes due to weather, you wouldn't get plateaus that flar in real life, pretty much ever, at least not at tropical latitudes. So yea, the temperature model is "broken", or to put it another way, pretty simple, and doesn't fully take into account how high temperatures can reach during the day and so forth. My guess is that the max. temperature plateau might actually a safety feature for gameplay, to prevent dwarves from melting in scorching climates. The low temperature plateau is probably a "minimum ambient temperature" defined by latitude and/or biome, that cooling occurs to.

Regarding the temperature plots from Phoenix, yes, temperature does flatten out a bit especially on warm days, but I'm not totally convinced by the examples yet, either. Like I've said, one, or a few, days do have slight weather fluctuations even in a desert with little to no "weather" as usually defined in temperate zones (rain, clouds, etc.). Also, the y-scale is really flat in those plots, leading to an illusion that the temperature is more even that it is. Possibly.

Oh, and we have different energy units because the calorie was probably invented first; it's pretty easy to define experimentally, you just need a heat source, a thermometer, and a scale (to measure how much water there is), and a closed water container to prevent evaporation. However, it's not a neat, SI, base-10 unit, unlike the Joule. Why are there (in the imperial system, of which "you Americans" are the last big die-hard users) so many arbitrary units of distance/time? At least the calorie is somewhat scientifically defined.


...and finally, regarding the 2nd sand desert plot, yea, I'd say the "hump" is a feature of the heating model. Either the insolation function only approximates a sine curve with linear segments, or the temperature curve is formed directly, and the slope of temperature increase is just set to drop by some % 3 hours after sunrise.