Disk generators for a raster display device
โ Scribed by Norman I. Badler
- Book ID
- 104290656
- Publisher
- Elsevier Science
- Year
- 1977
- Weight
- 261 KB
- Volume
- 6
- Category
- Article
- ISSN
- 0146-664X
No coin nor oath required. For personal study only.
โฆ Synopsis
A simple modification of Horn's circle drawing procedure yields a disk generator for a class of graphic devices capable of drawing rectangular areas. Another variation produces a disk a scan-line at a time, allowing it to be drawn at ~he refresh rate of the display. The calculations involve only additions and binary shifts.
The problem of generating circles efficiently on a graphic display device has been. discussed by Horn . His circle generator can be modified to enable a raster display to produce disks, that is, "filled-in" circles. Two algorithms are presented: The first for use where the graphic commands must be transmitted over a slow communications channel, and the second for generating disks a scanline at a time at the refresh rate of the raster display. It will be shown that the first algorithm is optimal in the sense of requiring the fewest graphic processor commands, provided that the processor can draw rectangles as a graphic primitive. Assuming enough local intelligence in the display processor to execute programs, the second algorithm is the most efficient in time and requires a constant amount of storage independent of the size of the disk.
1. DISK GENERATOR 1
Using Horn's notation and s ~ (x + ยฝ)5 + y2 _ r 2, the following procedure generates a disk with center x0, Y0, and radius r. disk]. : procedure (xu, yo, r) : x ~ r; y e--0; s ~--r do untily> x s+-s+2y+l ifs> 0 then plotrects (x, y) ; s e-s --2x + 2; x e-x --1 y~--'y+l end end plotreets (x, y) : feet (Xo -x, Y0 + Y, x0 + x, Y0 --y) rect (xo-y, yo+x, xo+y, yo--X) elld, 589
๐ SIMILAR VOLUMES