resortklion.blogg.se

X3 reunion map coordinate numbers too high
X3 reunion map coordinate numbers too high













I don't think there's a name for this algorithm, though it seems like a pretty standard technique.

x3 reunion map coordinate numbers too high

You seem to be doing the same thing for the y coordinate. I may be misinterpreting your code, but it seems like what you're doing is taking the even-numbered bits of the binary number, concatenating them together to form a new number, and using that number as your x coordinate. Some algorithms for fast interleaving of bits to encode these numbers using bit-manipulation operations can be found here. The mapping can be easily extended to higher dimensions. The resulting ordering can equivalently be described as the order one would get from a depth-first traversal of a quadtree.Īs shown in your example C++ code, the the x co-ordinate is stored in the even numbered bits and the y co-ordinate is stored in the odd numbered bits. Once the data are sorted into this ordering, any one-dimensional data structure can be used such as binary search trees, B-trees, skip lists or (with low significant bits truncated) hash tables. The z-value of a point in multidimensions is simply calculated by interleaving the binary representations of its coordinate values.

x3 reunion map coordinate numbers too high

#X3 REUNION MAP COORDINATE NUMBERS TOO HIGH CODE#

In mathematical analysis and computer science, Z-order, Morton order, or Morton code is a function which maps multidimensional data to one dimension while preserving locality of the data points. This mapping is called the Z-order curve or Morton code: So here's my question: does this algorithm exists already? Has it a name? Shortly after, the bulletin boards advertised that it was coming up for auction. So please correct me if this question is not at the right place. Sometime after I completed the Bala Gi missions in the 'vanilla' X3 Reunion, the unknown sector between Montalar and New Income was renamed 'Avarice' and spawned a Teladi Trading Station. So number 14 maps to the point (3, 2).Ī simple C++ program to generate coordinates for the first 50 ints: int x, y įor (int i = 0 i R bijection. You divide the number into 00|11|10, in which the most right part stands for (x,y)*1, the middle part part stands for (x,y)*2, the left part stands for (x,y)*4 (which is useless for number 14, just to make everything clear) and so on. So if you want, for example, a simple cubic lattice in 2D, and you want to know the coordinates of point number 14. com Listing ID 2810505 my room mate wants to go on vacation nice large furnished loft for short term lease. I was trying a bit with pen and paper, and found a nice algorithm to connect a coordinate (either in 2D or in 3D) with a number (and the other way around) by writing it out in binary form. Redwood Shores, Redwood City, CA Rooms for Rent. The problem was that I wanted to keep track of all these points. For those that aren't familiar with crystallography, you can find the most general cases of these structures here: As a part of the program, I have to generate all different basic points in a lattice structure.

x3 reunion map coordinate numbers too high

I'm writing a program for visualizing crystals.













X3 reunion map coordinate numbers too high