Line rasterisation: Cover all pixels, regardless of line gradient?

前端 未结 6 2061
南笙
南笙 2020-12-25 13:30

Basically, I want to use a line algo to determine which cells to check for collisions for my raycaster.

Bresenham isn\'t great for this as it uses a unified-thicknes

6条回答
  •  被撕碎了的回忆
    2020-12-25 14:25

    What about Bresenham with an additional constraint that no diagonal moves are allowed: Generate the points with the traditional algorithm, then as a post-processing step insert extra steps needed to make only orthogonal movements.

提交回复
热议问题