ravens/utils.py
def position_to_pixel(position, bounds, pixel_size):
    """Convert from 3D position to pixel location on heightmap."""
    u = int(np.round((position[1] - bounds[1, 0]) / pixel_size))
    v = int(np.round((position[0] - bounds[0, 0]) / pixel_size))
    return (u, v)
Convert from 3D position to pixel location on heightmap.
Convert from 3D position to pixel location on heightmap.
Convert from 3D position to pixel location on heightmap .
def position_to_pixel(position, bounds, pixel_size):
    u = int(np.round((position[1] - bounds[1, 0]) / pixel_size))
    v = int(np.round((position[0] - bounds[0, 0]) / pixel_size))
    return (u, v)
def position_to_pixel ( position , bounds , pixel_size ) : u = int ( np . round ( ( position [ 1 ] - bounds [ 1 , 0 ] ) / pixel_size ) ) v = int ( np . round ( ( position [ 0 ] - bounds [ 0 , 0 ] ) / pixel_size ) ) return ( u , v )
Convert from 3D position to pixel location on heightmap.
Convert from 3D position to pixel location on heightmap .
"""Convert from 3D position to pixel location on heightmap."""
position
bounds
pixel_size