-----Original Message-----
From: Gavin Maxwell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 15 January 2002 9:47 AM
To: Palm Developer Forum
Subject: RE: Drawing circle: example


> That looks identical to some code I sent to Paul Nevai back in July. From
> memory it worked quite well, albeit not highly optimised.

Actually I checked it visually before sending. :-) 

Regarding optimisation: the actual mid-point part looks OK with one possible
improvement: don't use 4*x1 and 4*(x1-y1) all the way, calculate it once
before the loop:
        
        delta1 = (x1<<2) + 6;
        delta2 = ((x1-y1)<<2) + 10;

        In loop:
                p += delta1;
        or
                p += delta2;

Can we avoid using x+.. in plotcircle? I can't think of anything so far.

> Plotting arcs is still quite simple if you use the parametric elliptical
arc
> algorithm. If anyone is after source for this I have it somewhere.

Please, I am curious :-)



Michael



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to