Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!sundc!potomac!saturn!xanthian From: xanthian@saturn.ADS.COM (Metafont Consultant Account) Newsgroups: comp.sys.amiga.hardware Subject: Re: (Non) Square Pixels? Message-ID: <11032@saturn.ADS.COM> Date: 27 Feb 90 13:58:21 GMT References: <4687@lmrc.uucp> <3119@cello.UUCP> <943@tardis.Tymnet.COM> Organization: Advanced Decision Systems, Mt. View, CA (415) 960-7300 Lines: 91 In article <943@tardis.Tymnet.COM> jms@tardis.Tymnet.COM (Joe Smith) writes: >The shape of the dots of phosphor and the number of phosphor dots >per square inch do not really affect the shape of the pixels. This discussion would be a lot clearer, and blessedly shorter, if the originating posting for the thread, or any other posting along the way, had bothered to state that what we would like to be square is the imaginary rectangle formed by connecting the _centers_ of the (almost inevitably _round_) phosphor dots or dot clusters in a two by two array of addressable pixels on an (ideal) screen, not particularly the dots or dot clusters themselves being square. When the physical vertical distance between two vertically adjacent pixel centers is the same as the physical horizontal distance between two horizontally adjacent pixel centers, then the math to draw a circle on the screen that looks perfectly round on the screen is simple and requires no "aspect ratio" corrections. When the ratio of horizontal to vertical center to center distances is something other than 1.0:1.0, then drawing a circle that looks round on the screen involves turning on a different set of pixels than for the square pixel case, and the difference is called an aspect ratio correction. Complicating the process of trying to achieve a "square aspect ratio" (i.e., a 1.0:1.0 one), are many realities. First, physical chemical phosphor dot placement on the inside of the screen face, or shadow mask grid design sitting just inside the phosphors, are considerations that require certain aimings of the crt beam to achieve the desired color by hitting the right chemical composition dot, or the right shadow mask grid opening. If the phosphor dot centers or the mask grid are not on square aspect ratio centers, you probably can't get a square aspect ratio in the display, though clever design can get you close. Second, "bottle" technology and availability in the low price market is driven by television needs, not by computing needs, so a consumer oriented computer, which has to compete on price since few customers would even understand the technical spec sheet, is probably going to have to live with the shape of the crt glass as demanded by TV, while a "techie" oriented computer workstation can pay the higher price for special run "bottles". Again, the TV 3:4 bottle aspect ratio influences how close the computer manufacturer can come to a square aspect ratio for pixel center offsets. Third, compatibility with an NTSC or a PAL standard again constrains you by telling you how many lines have to fit one way on the screen, albeit you can choose to use only a subset of them. Again, a constraint away from the "ideal" aspect ratio results. Fourth, given all these constraints, programming and architecture for the result is a lot simpler if the number of pixels in either direction either is a power of two, or is chosen to contain as large a power of two as possible, so that scan lines can begin and end on byte boundaries, screen saves fit 512 byte disk sectors, and so on. Again, this may not allow hitting a square aspect ratio for pixel center offsets, when combined with all the other constraints. The standard solution for decades now has been to do an aspect ratio correction before deciding what picture pixels to illuminate, so that circles come out round on the screen, whenever that is feasible. Some nice things don't work out well though; bit images don't rescale nicely by aspect ratios that aren't powers of two, so doing a 90 degree flip of a font character is likely to change its vertical to horizontal size ratio in its own coordinate system, because copying pixels is much more satisfactory than resampling them for this task. Similarly, scanned images are likely to look like accordians as they are subjected to quarter turns, because the cpu cycles needed to maintain the aspect ratios by resampling would slow the turns to a crawl, and the color change artifacts caused by resampling would be even more objectionable than the aspect changes. Trust me, I've coded this one. The world is full of compromises; aspect ratios "should" be square; they rarely are. -- Again, my opinions, not the account furnishers'. xanthian@well.sf.ca.us (Kent Paul Dolan) xanthian@ads.com - expiring soon; please use Well address for replies. Kent, the (bionic) man from xanth, now available as a build-a-xanthian kit at better toy stores near you. Warning - some parts proven fragile. Just another "overqualified" (read over 40 and previously well paid) unemployed/unemployable computer graphics programming guru. -> METAFONT, TeX, graphics programming done on spec -- (415) 964-4486 <-