Re: calculate part of solid circle in 2D array

2013-11-25 Thread Robert Voigtländer
Great discussion started here  To answer some of the questions and to give more background: - The grid resolution is 1x1cm. The problem starts when the distance of the readings gets high. Then a 1° resolution doesn’t cover all cells anymore. And cells get counted double on short distance

Re: calculate part of solid circle in 2D array

2013-11-25 Thread Gregory Ewing
Gene Heskett wrote: Your 1 degree assumption is, generally speaking, an extremely coarse answer in terms of the accuracy needed, as we need accuracies a lot closer to an arc-second than to a whole degree in robotics. That may be true for some applications, but somehow I doubt that a sonar bea

Re: calculate part of solid circle in 2D array

2013-11-25 Thread Gene Heskett
On Monday 25 November 2013 10:18:29 Roy Smith did opine: > In article <1fc9a269-4847-4d29-a35e-5cf91731e...@googlegroups.com>, > > Robert Voigtlنnder wrote: > > Thanks a lot for the links. > > > > I don't need it to be drawn. I need the fields within the arc for some > > statistical calculatio

Re: calculate part of solid circle in 2D array

2013-11-25 Thread Roy Smith
In article <1fc9a269-4847-4d29-a35e-5cf91731e...@googlegroups.com>, Robert Voigtländer wrote: > Thanks a lot for the links. > > I don't need it to be drawn. I need the fields within the arc for some > statistical calculations for an occupancy map. > So the target is a 2D array, not a picture.

Re: calculate part of solid circle in 2D array

2013-11-25 Thread Robert Voigtländer
Thanks a lot for the links. I don't need it to be drawn. I need the fields within the arc for some statistical calculations for an occupancy map. So the target is a 2D array, not a picture. Robert -- https://mail.python.org/mailman/listinfo/python-list

Re: calculate part of solid circle in 2D array

2013-11-25 Thread Peter Otten
Robert Voigtländer wrote: > OK. Found a good one here: > http://www.daniweb.com/software-development/python/threads/321181/python- bresenham-circle-arc-algorithm > > Now only filling is needed. > Any help is welcome ... I think you shouldn't implement the algorithm directly. Rather look for a l

Re: calculate part of solid circle in 2D array

2013-11-25 Thread Robert Voigtländer
OK. Found a good one here: http://www.daniweb.com/software-development/python/threads/321181/python-bresenham-circle-arc-algorithm Now only filling is needed. Any help is welcome ... Thanks Robert Am Montag, 25. November 2013 08:26:19 UTC+1 schrieb Robert Voigtländer: > Hi, > > > > I wonder i

calculate part of solid circle in 2D array

2013-11-24 Thread Robert Voigtländer
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.co