Path: utzoo!mnetor!uunet!hsi!stevens From: stevens@hsi.UUCP (Richard Stevens) Newsgroups: comp.graphics Subject: circles with non-unity aspect ratio Message-ID: <807@hsi.UUCP> Date: 5 Jan 88 01:31:15 GMT Organization: Health Systems Intl., New Haven, CT Lines: 38 Keywords: circle, aspect ratio, 3b1, ellipse I am trying to draw "good" circles on an AT&T 3b1 (aka, UNIX PC). The problem is the aspect ratio - it is nowhere near unity. I have gone through McIlroy's paper ("Best Approximate Circles on Integer Grids") and Foley & Van Dam. I see two ways to draw the circle: (1) Utilize "user coordinates" (in this case a 4096 by 4096 square) in which case I can use the algorithms as-is, however for each point on the 4096x4096 grid that I want to plot, I have to convert the point to device coordinates (430 by 288 for a square area on the 3b1). However, I'd guess that this will lead to a "messy" circle (i.e., not meeting McIlroy's "thinness" or "connectivity" criteria). Perhaps in this case, since I'd be going from a bigger coordinate space to a smaller one, there won't be any holes in the circle, but in general, I'd think a transformation like this could destroy some of the properties that the algorithm tries to preserve. Furthermore, this technique will take more time, since I'm calculating all the points on a 4096x4096 grid, when I'm really plotting on a much smaller area. Each step of the loop will also require a transformation of the x and y coordinates, which will take more time. (2) Utilize "device coordinates" (430 by 288, in this case). Here I need convert the circle parameters only once, instead of each time through the loop, however what I'm really drawing is an ellipse of pixels (that will appear as a circle on the screen). The two references that I've looked at don't go into this case. Am I missing something simple that would make it easy to draw my circles ?? Can anyone point me to another reference that adequately covers the drawing of a circle on a screen with a non-unity aspect ratio (F & VD mention a few, but before I go digging up the articles, does anyone know if these are what I should be looking at) ?? Richard Stevens Health Systems International, New Haven, CT { uunet | ihnp4 } ! hsi ! stevens