(edit: i have a solution im happy with involving just 3 plain queues and merging that ill write up in a reply tomorrow i wrote up here. feel free to share any interesting solutions you have though, especially ones taking minimal space)
do any of you know of a fast way to iterate over points of a grid sorted by distance along a particular direction (like in the image. by distance i specifically mean dot product between the point and direction), without actually having to sort a bunch of points? specifically for a 3d 256x256x256 grid, without precomputing for a single direction.
(i dont need the exact location of the grid points, just distances would be fine)
@unnick probably not me. I wonder if you want a transform for your iteration to make it x. It’s not clear to me if the point has two coordinates or if it’s got a fixed iteration distance and a separate distance from mean coordinate.
With almost no understanding on my part, and just a wish to promote your own problem solving: y=mx+b for lines and your iteration maybe as x plus the distance of the offset in x=my+b?
I hope this helps with ideas or further searches.
@drewdaniels @unnick I think this would be very efficient actually, a rotation is just a matrix multiply for each, you still have to sort on one axis but that might be less annoying

@mcc @drewdaniels @unnick i think you still gotta sort after transforming them, you just change from needing to sort on dot product to needing to sort on x of matrix product. Which also makes me think the x part of a rotation matrix might the dot product of said basis or something and maybe this helped me understand rotation matrices,,?!?

I was originally just replying to say thus was the best answer but it still requires sorting

Are the points known in advance? Just the direction unknown?