uplift = ( 0.5 * c/max_c + 0.1 * t/max_t - 0.4 * d/max_d + 0.399 )
I'd originally tinkered around with this to get the right coefficients. Now, though. I want to revisit it.
The greatest uplift should occur when C and D are both at their max. The lowest should be where D is max and the others are min.
But this was a distraction from the real issue: so far, I'm not considering the strength of each fault line. Take a look at these plates:
convergent = red; transform = green; divergent = blue |
These boundaries should not be treated the same. The thicker lines indicate stronger interactions, and represent a larger uplift.
To do this, I'll find the closest fault for h in hexes, and capture $s \over d$, where $s$ is the strength of interaction, and $d$ is the distance to the fault line.
.......It was at this point that my project was diverted into fixing the hex distance function. It's not as easy as using the standard distance formula. Why not?
Remember that I'm using a novel hex plate "projection" from the Tao. This means that distances between hemispheres are 1) not displayed according to their true position and 2) are "toroidally" wrapped between the equator. If the two hexes in question are in the same hemisphere, there is no issue: I can use the regular distance formula:
\[d = \sqrt{\left(x_2-x_1\right)^2 + \left(y_2-y_1\right)^2}\]
Which can be found trivially. But how to handle different hemispheres?
Amit's page here (of course) was extremely helpful in working through this. I realized that if the on-screen distance is correct inside a hemisphere, then I needed to transform one of the hemispheres to simulate this, and then take that distance.
I had been using a really inefficient method where I found a point on the equator that minimized the distance between each hex and that point. I feel dirty just describing it. This method is cleaner, quicker, and not brute-force.
Then I realized that it would be even better to use IDW (which is great but can take a while to run). So I get this map (using $n=2$ for IDW), which still doesn't make much sense.
The uplift map is easier to interpret (with only one variable instead of 3 smashed into a single color code).
No comments:
Post a Comment