Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Unlimited canvas painting program Date: Thu, 24 Oct 2013 21:51:18 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 29 Message-ID: References: <5d107d11-0abf-4180-a994-3368f12979c1@googlegroups.com> NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1382651478 13494 64.122.56.22 (24 Oct 2013 21:51:18 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 24 Oct 2013 21:51:18 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:57474 On 2013-10-24, Tim Chase wrote: > On 2013-10-24 12:16, markotaht@gmail.com wrote: >> How to create a program similar to paint, but the difference would >> be that the cursor would be always in the middle and the canvas >> moves or the camera is always fixed on the cursor as it moves >> around the canvas. And the canvas should be infinite. What would be >> reasonable to use? > > To hold an (effectively) infinite *bitmap* canvas, you'd (effectively) > need an (effectively) infinite amount of memory. Sparse arrays allow it to be sort-of implemented as long as most of the bitmap is "empty". > However, it could be done with an (effectively) infinite *vector* > canvas. Sort of. Eventually you run out of bits to hold the coordinates. > That way you could limit the on-screen rendering to just the > clipped subset of the vector collection. The same can be done for a sparse array of bitmap subsets. -- Grant Edwards grant.b.edwards Yow! I'm totally DESPONDENT at over the LIBYAN situation gmail.com and the price of CHICKEN ...