• Representing Color
  • Coordinate Systems
  • Chapter 1: Computer Systems




    Download 225,5 Kb.
    bet10/10
    Sana22.07.2024
    Hajmi225,5 Kb.
    #268238
    1   2   3   4   5   6   7   8   9   10
    Bog'liq
    slides01

    Introduction to Graphics

    • The last one or two sections of each chapter of the textbook focus on graphical issues
    • Most computer programs have graphical components
    • A picture or drawing must be digitized for storage on a computer
    • A picture is broken down into pixels, and each pixel is stored separately

    Representing Color

    • A black and white picture can be stored using one bit per pixel (0 = white and 1 = black)
    • A color picture requires more information, and there are several techniques for representing a particular color
    • For example, every color can be represented as a mixture of the three primary colors Red, Green, and Blue
    • In Java, each color is represented by three numbers between 0 and 255 that are collectively called an RGB value

    Coordinate Systems

    • Each pixel can be identified using a two-dimensional coordinate system
    • When referring to a pixel in a Java program, we use a coordinate system with the origin in the upper left corner
    • Y
    • X
    • (0, 0)
    • (112, 40)
    • 112
    • 40

    Download 225,5 Kb.
    1   2   3   4   5   6   7   8   9   10




    Download 225,5 Kb.