I'm trying to extend an isometric Flash game based on as3isolib. The game does only support diamond shaped grids but I have to implement the possibility to have rectangular shaped grids, too. Please see my example grid.

With a cellsize (isometric width and length) of 20px, the isometric positions of the grid cells shown above are:

[DataNode (col:0, row:0, x:0, y:0)]

[DataNode (col:0, row:1, x:20, y:0)]

[DataNode (col:0, row:2, x:20, y:20)]

[DataNode (col:0, row:3, x:40, y:20)]

[DataNode (col:0, row:4, x:40, y:40)]

[DataNode (col:0, row:5, x:60, y:40)]

[DataNode (col:0, row:6, x:60, y:60)]

[DataNode (col:1, row:0, x:20, y:-20)]

[DataNode (col:1, row:0, x:20, y:-20)]

[DataNode (col:1, row:1, x:40, y:-20)]

[DataNode (col:1, row:2, x:40, y:0)]

[DataNode (col:1, row:3, x:60, y:0)]

[DataNode (col:1, row:4, x:60, y:20)]

[DataNode (col:1, row:5, x:80, y:20)]

[DataNode (col:1, row:6, x:80, y:40)]

[DataNode (col:2, row:0, x:40, y:-40)]

[DataNode (col:2, row:1, x:60, y:-40)]

[DataNode (col:2, row:2, x:60, y:-20)]

[DataNode (col:2, row:3, x:80, y:-20)]

[DataNode (col:2, row:4, x:80, y:0)]

[DataNode (col:2, row:5, x:100, y:0)]

[DataNode (col:2, row:6, x:100, y:20)]

The problem is that all objects and avatars are still placed like as the grid were diamond shaped. This is because the formula for calculating the column and row number based on an isometric x/y position is only working for diamond grids: