Bresenham Line of Sight

Version 1.1 (79.4 KB) by Patrick Hew
Check for line of sight between points in a binary occupancy grid using Bresenham's line algorithm.
81 Downloads
Updated 5 Jun 2024

View License

Check for line of sight between points in a binary occupancy grid using Bresenham's line algorithm. The function bresenhamlineofsightint checks for line of sight between cell corners (integer coordinates), the function bresenhamlineofsightarb checks for line of sight between arbitrary points (arbitrary coordinates), and the function bresenhamlineofsightfromtoarb returns the distance that is clear along a line of sight to an arbitrary point. Implementations are provided as m-functions and C source code that can be compiled into MEX-functions (the m-functions were developed as the prototypes for the MEX-functions).

Cite As

Patrick Hew (2025). Bresenham Line of Sight (https://se.mathworks.com/matlabcentral/fileexchange/75153-bresenham-line-of-sight), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Bresenham Line Segments/demo

Version Published Release Notes
1.1

Added bresenhamlineofsightfromtoarb.

1.0.1