CS 184: COMPUTER GRAPHICS



PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

Lecture #2 -- Th: 9/02/2004.

Brief Review

  • The three pillars of Computer Graphics
  • Trends in Computer Graphics
  • Calligraphic Devices versus Raster Devices.
  • Drawing/Painting on Raster Devices

  • A more detailed look at a Frame Buffer -- the heart of a Raster Device:
  •   -- bit planes: as many as you want to see different colors;
      -- color map: input = # of bit planes; output = # of inputs to all DACs
      -- DACs to set the 3 intensities for RGB
      -- The 3 RGB intensity signels determine the color of one pixel displayed on the CRT).

  • Foil: How to draw a banana or a thin line ?
  • Foil: Which PIXELS should be turned on ?
  • (E.g., Bresenham algorithm to turn on "the right" pixels efficiently.)
    [Ch 8.9-8.10]

    Standard Line-Drawing Abstraction (e.g., OpenGL API)

    Pre-coded routines to do the low-level work for you:
  • Moveto(Pt),
  • Lineto(Pt),
  • Begin PolyLine -- Pt -- Pt -- Pt -- ... -- Pt -- End PolyLine.

  • You will use such routines in your first programming assignment.

    Basic Interactive Graphics - - First Homework Assignment.

    ASG #1:  How to draw lines interactively on a raster device.
    You will be using a standard mouse to define vertices on the screen,
    which then get automatically connected by straight line segments.

    With proper software support, a mouse is a very versatile device
    and can be used for pointing, drawing, flying through virtual space,
    controlling the view of the scene, modifying objects.

    Interaction Devices

    Mouse is not the only interaction device. There are many others.
    To get an idea: Read: Ch 3.2
    These are some of the physical input devices that you may hear about in this course:
  •  Keyboard (input character codes),
  • Lightpen (absolute positioning on screen),
  • Tablet (absolute positioning on desktop),
  • Mouse (relative positioning),
  • Trackball (relative positioning),
  • Joystick (velocity control),
  • SpaceBall (6 DoF velocity control),
  • Polhemus Magnetic Wand (3D position input),
  • Data Glove (3D position and gesture input),
  • Haptic stylus,
  • ...

    All these devices need to be supported with proper software.
    To reduce that burden and to exploit the conceptual similarities of many of these devices,
    a few "logical input devices" are defined with corresponding generally usable APIs.
    One typically defines for each device a "measure" describing the value(s) returned by the device,
    and a "trigger" which is a signal that generates an event in the graphics program.
    PHIGS and GKS (two standard graphics frameworks) define
    six conceptual logical input devices

    OpenGL works at a slightly lower level; many of the above functions are synthesized
    from basic position information and appropriate context-sensitive software;
    these pieces of the user interface, often associated with separate small windows
    (e.g., pull-down menues or sliders), are also called "widgets".

    Different relationships between the measure process and the trigger event define different input modes:


    Administrative Intermezzo

    All declared majors from the wait list should now be in the class. -- No appeals forms necessary!

    The bottlenecks are the 1-2 and the 2-3pm discussion sessions. Try to avoid those!
    The 3-4pm discussion session is almost empty !!

    HW #1 -- how is it going ? ==> Deadline extended till Wednesday, Sept. 8, noon !


    Modeling versus Rendering

    The computer graphics paradigm makes a clean distinction between the (virtual) model
    and a rendering (projection, display) of this model from a particular viewpoint.
    [Ch 1.6]

    To generate a computer graphics display of a scene, we need three things:

    Object Representation in CG

    In general you would like to preserve the objects that you have created  (e.g., your car_outline polygon of ASG#1).
    How can you do that ?
     -- Core dump from memory ?
     -- Printing out all data structures ?
     -- A terse minimal set of information that will permit to recreate the polygon ?
    It would be great if somebody else also could read your data and draw your polygon ...
    ==> We need a standard polygon interchange format !
    That also goes for the more complicated objects that you will create later in the course.
    For our graphics courses at Berkeley we have created our own format to define objects and scenes:
    ==> "SLIDE".
    (Its semantics is very close to OpenGL).

    "SLIDE" :  Scene Language for Interactive Dynamic Environments

    FULL  SLIDE  DEFINITION  is posted on the WEB.
    The SLIDE language emerged from more than a decade worth of experience
    with a whole series of formats to define graphics objects and scenes.
    Some of the intermediate formats were:

    Reason why we give out the language (and system architecture) early:
    See the "grand" picture; know the target of your system-building efforts.
    Basic concepts the SLIDE language:

    This is called a "boundary representation" or B-rep for short,
    (we omit discussion of hierarchy and time dependence for today).
    All you need to know of SLIDE for Assignment #1 are the constructs: This B-rep can easily be extended to 3-dimensional objects.


    Reading Assignments:

    Study: 2ndEd: Ch 1.6, Ch 2.2, Ch 3.1-3.2, Ch 7.8-7.9,
    Study: 3rdEd: Ch 1.6, Ch 2.3, Ch 3.1-3.2, Ch 8.9-8.10,

    Skim:  2ndEd: Ch 3.5,
    Skim:  3rdEd: Ch 3.5,


    Current Homework Assignment:

    ASG#1:  "BASIC CAR" -- Interactive Polygon Builder



    PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT
    Page Editor: Carlo H. Séquin