Convert list index to a 3D position based on width and height
I’m working on a CPU voxel raytracer in Python. With the amount of costly calculations involved everything must be as efficient as possible especially storing and fetching point data in space. I started by storing 2D and 3D data in dictionaries indexed by string positions, eg: data["4,16"] == "solid". Since converting positions to and from… Read More Convert list index to a 3D position based on width and height