Isometric Zoning Math

Started by
0 comments, last by wodinoneeye 17 years, 5 months ago
The following screenshot is a Isometric Grid. What I want to do is be able to find out what zone each tile is in. http://img226.imageshack.us/my.php?image=isometriczonehelpvi9.jpg So based upon the screenshot what math equation do I use to determine what zone a tile is in given the x,y coordinate?
Advertisement


Your top row on that picture is wrong 5:24 should be 5:23

That could be a starting place to at least identify the Y
count of a systemaic cartesoan system of zones (stepping by
8 from the origin.

Likewise the X coordinates step by 4 across each zone.


If you organized the zone identifiers via a number system
then the ZONE address of any point would be:


ZX = (int)tilex / 4 (assumes rounding down to 0 for full fraction range)
ZY = (int)tiley / 8

This could then be combined into a single value

ZID = (ZX * YZONECOUNT) + ZY // YZONECOUNT being count of Y zone size of world


I prefer a Y major system but thats just a preference.


--------------------------------------------[size="1"]Ratings are Opinion, not Fact

This topic is closed to new replies.

Advertisement