Date: Sun, 2 Feb 1997 13:53:50 +0000 ( ) From: Gurunandan R Bhat To: Benjamin D Chambers Cc: djgpp AT delorie DOT com Subject: Re: ellipses at an angle In-Reply-To: <19970201.211349.4943.1.chambersb@juno.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 2 Feb 1997, Benjamin D Chambers wrote: > > On 1 Feb 1997 20:32:31 GMT hotpulp AT netidea DOT com writes: > >I was wondering: how would I go about drawing an ellipse that has its > >major and minor axis at an angle? If you're having trouble > Well, you could use the original definition of an ellipse (that is, from > any point on the ellipse, the sum of the distances from that point to the > two foci equals 1). The math gets a little messy though. its not very different from drawing a circle. for an ellipse, you do: x = r1 * cos(t); y = r2 * sin (t) if r1 is the same as r2 you get a circle. if you want a shifted ellipse, by an angle a say, do this: x = r1 * cos(t + a) ; y = r2 * sin(t + a) for a whole set of values of t from 0 to 360. there was a thread here earlier discussing how this could be done with integers. try the mail archives for that. gurunandan bhat goa, india