Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.graphics Subject: Re: Tilted ellipse. Message-ID: <46900043@uxe.cso.uiuc.edu> Date: 13 Oct 89 00:42:00 GMT References: <4821@druco.ATT.COM> Lines: 40 Nf-ID: #R:druco.ATT.COM:4821:uxe.cso.uiuc.edu:46900043:000:1542 Nf-From: uxe.cso.uiuc.edu!mcdonald Oct 12 19:42:00 1989 /* Written 11:35 pm Oct 10, 1989 by mccaugh@s.cs.uiuc.edu in uxe.cso.uiuc.edu:comp.graphics */ 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) /* End of text from uxe.cso.uiuc.edu:comp.graphics */ I see that you are also at the U of Ill. Are you a grad or undergrad? If you are an undergrad, did you take freshman English? CAn you read??? The request was for a FAST tilted ellipse drawer. I, and probably most other people, are perfectly aware of rotation matrices. But rotating point by point with a rotation matrix is hardly FAST. In fact it is b...o...g s........l.........o..........w. Even with cos and sin tables. What I am looking for is something that can be stuck in Bresnahan's algorithm. And, please, have some nice way of specifying the ellipse (like major and minor axes and rotation angle, or tangent thereof. Doug McDonald