Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'algorithm': 0.04; 'pil': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:array': 0.16; 'wrote:': 0.18; 'library': 0.18; 'header:User-Agent:1': 0.23; "shouldn't": 0.24; 'sorry,': 0.24; 'header:X-Complaints-To:1': 0.27; 'function': 0.29; 'needed.': 0.30; 'robert': 0.30; 'ok.': 0.31; 'url:python': 0.33; 'skip:b 30': 0.33; "can't": 0.35; 'there': 0.35; 'url:org': 0.36; 'implement': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'details.': 0.61; 'you.': 0.62; 'here:': 0.62; 'url:htm': 0.73; 'filling': 0.78; 'url:reference': 0.84; 'directly.': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: calculate part of solid circle in 2D array Date: Mon, 25 Nov 2013 10:01:05 +0100 Organization: None References: <30510ff6-f414-49aa-90d6-73a4610d8f77@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Gmane-NNTP-Posting-Host: p5084ac98.dip0.t-ipconnect.de User-Agent: KNode/4.7.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1385370037 news.xs4all.nl 15896 [2001:888:2000:d::a6]:48301 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:60405 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 library that does it for you. If you are using PIL like in the link you give above consider using the draw.arc() function directly: http://effbot.org/imagingbook/imagedraw.htm There is also cairographics where you draw a "path" on a "surface". http://cairographics.org/documentation/pycairo/2/reference/context.html http://cairographics.org/documentation/pycairo/2/reference/surfaces.html Sorry, I can't help with the details.