Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uxc.cso.uiuc.edu!s.cs.uiuc.edu!mccaugh From: mccaugh@s.cs.uiuc.edu Newsgroups: comp.graphics Subject: Re: Tilted ellipse. Message-ID: <207400032@s.cs.uiuc.edu> Date: 12 Oct 89 00:40:11 GMT References: <4821@druco.ATT.COM> Lines: 24 Nf-ID: #R:druco.ATT.COM:4821:s.cs.uiuc.edu:207400032:000:747 Nf-From: s.cs.uiuc.edu!mccaugh Oct 10 23:35:00 1989 connors@druco.ATT.COM (Paul Connors) writes: > Does anyone have an algorithm, or code, for drawing > a TILTED ellipse quickly on a bit-mapped device? Assuming you can plot the pixels of an un-tilted ellipse (horizontal major axis and vertical minor axis) -- say, from: (x-h)^2 (y-k)^2 ---- + ---- = 1, (centered at ) a^2 b^2 the new coordinates of the point on the original ellispe rotated an angle @ about its origin (at ) are as follows: x' = u + h, where: u = (x-h)*cos(@) - (y-k)*sin(@) and y' = v + k, where: v = (x-h)*sin(@) + (y-k)*cos(@) Scott McCaughrin University of Illinois (mccaugh@s.cs.uiuc.edu)