Re: Representing 3d Staircases? (Python)
@camlorn, we must then have an array holding more indexes to the three arrays that hold our tile information.
Consider the good old example from post 15:
value = [1, 2, 3]
start = [4, 5, 6]
stop = [7, 8, 9]
If we look at this in a 2d grid (our y gets encoded), we can't tell the x by reading the y array directly. We must have something like this:
grid = [
[1, 2],
[0, 1]
[0, 1, 2]
]
If we do not have an array with these indexes, we can't distinguish whether a tile matches the x value, leading to wrong output.
In practice, what would happen is me passing in the point, something like (0, 0), and then the program would perform a binary search through the tiles that the zeroth column of the grid has marked present and check if the coordinate, 0 in this case, is being covered by the tile boundaries.
Let's do another example. I pass in the point (2, 4)
The program goes through the tiles at position 2 on the x and find that 4 is being covered by the zeroth tile in the arrays, which has a tile type of 1.
What am I missing here?
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector