Attached you'll see 4 different hexagonal layouts. See if you can develop conversion methods to intertranslate between each.
Of course, the Family Map doesn't have enough information to translate directly to the other three, so assume you know the index of the sector that the individual Family cell is in.
You don't have to make a 1 to 1 translation for each possability, you can daisy chain to translate, ie...
If you have a translation from Cell to Ring_Sector_Offset,
And a Translation from Ring_Sector_Offset to Family,
And a Translation from Family with Sector to Cell, then
that is more than enough. All you'd have to then do is get XYZ to one of those three, and any one of those three to XYZ, and you'd be able to go from 1 to all of them.
Now, the conversions from XYZ to Ring_Sector_Offset might be the hardest to do, so be creative in your strategies.
I'll post my solutions in a few days, so...
-Have Fun
-Lou
Last edited by NotLKH; Mar 13th, 2004 at 06:56 PM.
I found a solution with the following conversions:
RSO -> Family
RSO -> Cell
Cell -> RSO
RSO -> XYZ
XYZ -> RSO
I'll post it as an attachment instead of in this post, so if you want to solve it yourself, don't look at it.
Ok. A quick glance shows me you picked up on some key points.
I'll start looking at it momentarily.
But, first a Bonus Question:
Since the subject is Hexagonal Mapping conventions, I dredged something up from my distant Commadore & Qbasic days, {when I created a program to build a standard Ace of Aces set of books from the mathematical hexagonal methods I managed to harvest from analysis of an Ace of Aces Baloon Buster set of books that I had. Phew, not only i,j,k but each cell had a rotation orientation! Plus I had to translate {i,j,k,rotation} to linear! And that mid-page manuever, ingenious! I'll have to redevelop it again someday.}. See if you can make translation equations to go from XYZ to the following IJK mapping.
BTW, The I,J,K mapping just tells you how to get from the XYZ origin to any of the other cells in the XYZ map, where i = (0,1,-1). j = (-1,0,1) and k = (1, -1, 0)
Now you could get from the origin to any XYZ cell in many infinite possible ways of first travelling p units of i, then q units of j, and then r units of k, so the "hard" part is determining the shortest path of {i,j,k} to get to xyz from 000.
-Have Fun
-Lou
hmmm, gonna have to scale down that pict a bit. eh, I guess maybe later.
Last edited by NotLKH; Mar 14th, 2004 at 04:27 PM.
So, given a coordinate (x,y,z) you want to find the corresponding (a,b,c) so that ai+bj+ck = (x,y,z)
The algorithm I propose to find (a,b,c) is simple:
Repeat until (x,y,z) = (0,0,0):
If y>0 and z<0 then
let a = a + 1
let (x,y,z) = (x,y,z) - i
Same thing for +i,-j,+j,-k,+k
In (x,y,z) notation, the following is always the case: x+y+z = 0
Because of that, there will always be one of x,y,z>0 and another <0, unless all of them are 0. That means that thiss loop will always do something. It will make |x|+|y|+|z| 2 smaller, the number >0 is decreased, the number <0 is increased. This continues until x=y=z=0, so this loop will terminate.
To show that this algorithm provides the correct answer I propose the following invariant:
ai + bj + ck + (x,y,z)new=(x,y,z)original
This is not hard to see, look for example at the step:
let a = a + 1
let (x,y,z) = (x,y,z) - i
So:
anewi + (x,y,z)new = (aprevious+1)i + (x,y,z)previous - i
anewi + (x,y,z)new = apreviousi + (x,y,z)previous
Ok. I see you've been busy.
Attached You'll find my text response to your {twanvl's} text response.
However, let me first display the Family Numbers when you go from ring 1 to ring 5
VB Code:
Matrix of Fam Number in relation to Ring and Offset:
- 01 02 03 04 05 ...Ring
0 01 02 04 07 11
1 -- 03 05 08 12
2 -- -- 06 09 13
3 -- -- -- 10 14
4 -- -- -- -- 15
5
.
.
.
off
hmmm, my tables messed up a hair. oh well, its understandable anyways! Got It! I'll add some zeroes.
As you can see, Family Numbers are Triangular, and not based on 2^n.
I'll check into your IJK in a little bit. I gotta go now.
-Lou
Last edited by NotLKH; Mar 14th, 2004 at 02:37 PM.
You could also make a (x,1/2 i) mapping (combining the x axis, and the i axis scaled) That would look something like this. This mapping is like a square (maybe you should use the rotated, (z, 1/2 k) mapping).
BTW, All this is a precurser to the grand {opening? exposure? revalation? Papa Can you hear me???...} of "Why One?".
But, thats besides the point.
ATM. {At the Moment}
So. Wahn Moe Ting.
If you specify a row whose constant value is m, {either m = x, y, or z, depending on your momentary mood}, if n = one of the other coords, and p = the remaining coord, in an xyz mapping,:
What is the min and max value that n range? {And, verse vica, p???} ?
-Lou
BTBTW: 2 More days until a higher authority recieves "Why One?"
I hope I hope I hope he sees some merit!!!
-Lou
Last edited by NotLKH; Mar 14th, 2004 at 10:32 PM.
1: "There is a simple relationship between r and the values of x,y,z which require no analysis between x and y and z. It hinges on "inverting" your observation of x + y + z = 0"
well, R (if R means row) = (|x|+|y|+|z|)/2
Anyway, what i wanted to say was:
if you can map P->Q, and Q->R, you can map P->R.
e.g. twanvl said he/she could map
RSO -> Family
RSO -> Cell
Cell -> RSO
RSO -> XYZ
XYZ -> RSO
So they can also map:
Cell -> XYZ (through RSO)
XYZ -> Cell (through RSO)
and i'm not sure, cos i haven't tried yet, but wouldn't it be not too hard to map P->Q if you can already map Q->P?
Originally posted by sql_lall Sorry, i just had to say something:
1: "There is a simple relationship between r and the values of x,y,z which require no analysis between x and y and z. It hinges on "inverting" your observation of x + y + z = 0"
well, R (if R means row) = (|x|+|y|+|z|)/2
Exactly!
Originally posted by sql_lall Anyway, what i wanted to say was:
if you can map P->Q, and Q->R, you can map P->R.
yep! thats what I meant when I said:
you don't have to make a 1 to 1 translation for each possibility, you can daisy chain to translate
Hi, I just tought of another mapping scheme. This one has some fractal like properties, which you will probably not enjoy when thinking of a conversion
I define it as a mapping to (i,j,k) coordinates:
F(0) = (0,0,0)
F(4n) = -2 F(n)
F(4n+1) = -2 F(n) + i
F(4n+2) = -2 F(n) + j
F(4n+2) = -2 F(n) + k
Every cell should now have a single, unique number (proof?). The numbering will look something like this: