Computer Graphics (ii) loading of _5_ frame cache values for output elements

Source: Internet
Author: User

loading of frame cache values

The last step in implementing the segment and other object display functions is to set the color value of the frame cache. Because the scan conversion algorithm generates pixel locations at a continuous unit interval, the scan conversion algorithm can use an incremental approach to efficiently access the frame cache at each step.

as a special example, assume that the frame cache matrix is addressed in the main order of behavior, and that the pixel position is from the top left of the screen( 0,0) changes to the upper right-hand side of the screen (Xmax,yMax)(see Figure 3.14). For level two systems (1 bits per pixel), pixel position (x, y)the frame cache bit address can be computed like this:

The frame cache address at the pixel (x+l, y) can be computed based on the address offset of the location (x, y) as it moves along the scan line:

from (x, y) to the next scan line in diagonal direction, then (X+l, Y+l) the frame cache address of the equation is

where the constant xmxa+2 is only counted once for all segments. Similarly, the x and y negative sides of the screen can be obtained from the equation (3.23)calculates the increment of the unit step. This address calculation contains only one integer addition.


The method of implementing a SetPixel program that stores pixel luminance values depends on the capabilities of the particular system and the design requirements of the package. ForA system that can display a range of luminance values for each pixel, and the calculation of the frame cache address includes the pixel width (number of bits) and the pixel screen position.

Computer Graphics (ii) loading of _5_ frame cache values for output elements

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.