[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [paragui-dev] Ellipse Function?
From: |
Andrew Ford |
Subject: |
Re: [paragui-dev] Ellipse Function? |
Date: |
Sat, 20 Apr 2002 15:17:49 -0700 (PDT) |
You'll have to add it yourself. Hmm... ellipse
drawing algorithms... I'm sure you can find some on
the web. You may even be able to adapt an
anti-aliased line-drawing algorithm for the ellipse.
(x^2 / a) + (y^2 / b) = 1
the slope is dy/dx.
y ^ 2 = b - b/a x^2
2y dy/dx = -2bx/a
dy/dx = - bx/ay (if I didn't screw something up)
okay, so your slope at (x,y) is -bx/ay
Perhaps you could use this slope with bresenham's
algorithm, I think there's an anti-aliased bresenham
around somewhere...
Andrew
--- Mark Krosky <address@hidden> wrote:
> Is there an Ellipse function available anywhere, or
> do I have to add it
> myself? Does anybody know what's a good algorithm
> to use?
>
>
> _______________________________________________
> paragui-dev mailing list
> address@hidden
>
http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-dev
__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/