[A89] Re: filling ellipses


[Prev][Next][Index][Thread]

[A89] Re: filling ellipses




heh i forgot this part, incase you didn't figure it out the (x,y) are points
on a graph that you wish to test to see if they are inside the ellipse bye
testing test (0 < test < 1).
If thats not right I'll look into later when I have some more time

BioSLuDge

> The equation (((x-h)^2)/a^2) + (((y-k)^2)/b^2) = test
> where (h,k) = (x,y) that you put into the draw ellipse function and the a
b
> respectivly will returne 0 < test < 1 (test > 0 && test < 1) if those
points
> are inside the ellipse.  I think thats right, if it does not work let me
> know and I'll get out my old math book  :)
>
> BioSLuDge
> ----- Original Message -----
> From: "jeff" <jefromi42@yahoo.com>
> To: <assembly-89@lists.ticalc.org>
> Sent: Saturday, July 07, 2001 2:04 PM
> Subject: [A89] filling ellipses
>
>
> >
> > Does anyone know a good fast way to fill an ellipse (using not only
black
> and white, but xor)?
> > There is a draw ellipse function, but nothing for filling it.  A for
loop
> decrementing the radius
> > by one doesn't work; it leaves out a few pixels.  You can't use a
decimal
> radius, which might
> > work.  I was thinking along the lines of either calculating horizontal
> points on the circle then
> > connecting them with a line or doing a pixel test thing, sweeping
across,
> filling once it detects
> > the edge of the circle.  The problem is, I'm not sure if this could be
> efficient if you're drawing
> > onto a background.  Another idea was to create an array when you begin
> that symbolizes the
> > rectangle around the ellipse, then use ones and zeros to create the
filled
> circle, basically as a
> > sprite in a different form, then copy it to the screen pixel by pixel.
> I'm not sure that any of
> > these will be very fast, though.
> >
> > Thanks,
> > jeff
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >
> >
> >
>
>
>



Follow-Ups: References: