calculate part of solid circle in 2D array

Robert Voigtländer r.voigtlaender at gmail.com
Mon Nov 25 02:26:19 EST 2013


Hi,

I wonder if someone can help me with a function I need for programming my robot.
I want to update an 2D occupancy grid based on sonar data. The sonar “view angle” is cone shaped. So I need to calculate all cells of a 30° slice of a filled circle.
Something like this: http://www.intechopen.com/source/html/37778/media/fig2.jpg

Using trigonometry is too expensive. I think something like Brenham’s circle algorithm would be a good candidate.
But I need it filled (that would be doable for me I think) and I don’t need the full circle but only a part of it.

I wonder if someone has a function like this lying around. If so I would be glad to not have to reinvent the wheel 

Thanks and cheers
Robert



More information about the Python-list mailing list