INTERACTIVE COMPUTER GRAPHICS
USING THE X WINDOW SYSTEM
This page describes a book for teaching graphics in an X environment
without having to struggle with the complexity of X. A
Starter
Toolkit makes programming in X easy, at least for the type
of programs required in a basic graphics course. The book emphasizes
video games and drawing programs (such as the one that produced the
picture to the right)
as means to introduce students both to concepts of
graphics and to event driven programming.
T. Pavlidis, Interactive Computer Graphics in X,
PWS Publishing Co., 1996
(ISBN 0-534-94986-X)
It can be ordered from the ITP Distribution Center 800-842-3636.
Click here for publisher's web page of the book
A list of chapters and topics is given next. Chapters marked with a (*)
deal with features of X beyond the
Starter Toolkit
and they are optional.
Chapter 1: Windows and Graphics (page 1)
- Overview of window systems from a users viewpoint
- Hardware for such systems
- What is the X Window System
- The Starter Toolkit as means to do simple graphics
within the X Window System environment
- Primitive graphics functions of the Starter Toolkit
- Simple visualization programs.
Chapter 2: Event Driven Computing (page 31)
- User driven computing: interrupts and events
- Means of handling user input or other external
actions (event handling)
- Functions of the Starter
Toolkit for handling input from the mouse and the keyboard
- Example programs: Painting with Pixels; Drawing
Lines (``Rubber banding''); Typing words at positions pointed by the mouse; Using a Color Palette.
Chapter 3: Icons and Games (page 65)
-
Creating and using icons
- cursor icons and icon masks
- Animation and video games built from icons
Chapter 4(*): Fundamentals of the X Window System (page 95)
-
Major features of the X Window System, especially
those pertinent to creating graphic displays
- X
Protocol and Xlib
- Clients and Servers
- Window
Managers
- Window creation, mapping, and reparenting
- Attributes, Properties, and Atoms
Chapter 5(*): Drawing on the X Window System (page 114)
-
Drawables
- Pixmaps
- Graphics Context
- Primitive
graphics functions of Xlib
- Icons
- Color
- Fonts
Chapter 6(*): Event Handling in the X Window System (page 131)
-
Dealing with the event queue
- the
XEvent
structure
-
Types of Events: generated by direct user action
or by the window manager
- Event Selection
-
Implementation of a Simple Programs for Visualization and Drawing.
Chapter 7: Graphical Computing (page 151)
- Graphics as means of human-computer communication
- Menus, Buttons, and Panels
- Facilities of the
Starter Toolkit for constructing selection panels
-
Examples of using panel buttons to select the event
handler or to select the values of parameters
-
Use of pipes for graphic interfaces to existing programs.
Chapter 8(*): The X Window System Toolkit (page 188)
-
Window objects
- Associating events with window
objects
- The X Window System Toolkit: Intrinsics
and Widgets
- Relationship between the X Toolkit,
Xlib, and Widget Sets such as Motif
- Widget Class
Hierarchy and Widget Trees
- Resources
- Callbacks
- Event Handlers
Chapter 9(*): Using Toolkits (page 212)
-
Creating Widgets
- Starting an Application
- The
Starter Toolkit
- The Tk Toolkit
Chapter 10: Plotting Lines and Circles (page 241)
-
Plotting of lines on bitmaps
- Plotting of circular arcs on bitmaps
- Plotting arcs through
straight lines
- Using of the plotting functions
in the pixel painting program.
Chapter 11: Filling Areas (page 264)
-
Filling the interior of an irregular area surrounded by pixels
- Connectivity or Flood Filling.
**
**
Chapter 12: Filling Polygons (page 277)
-
Filling Polygons using a Parity Rule
- Singular
Cases
- Facilities of the Starter Toolkit for
polygon filling
**
**
Chapter 13: Geometrical Objects and Transformations (page 296)
-
Representation of shapes as geometric objects
rather than pixel arrays
- Scaling
- Translation
- Rotation
- Pointing to objects
- Pointing to line segments.
Chapter 14: Programs for Drawing (page 321)
-
Drawing various shapes
- Usage functions
-
Grabbing and dragging Selecting the object pointed
by the user
- Selection and Operations on groups
of objects
- Callback Structures for buttons that
select editing operations.
Chapter 15: Operations on Lines (page 341)
-
Extracting information about the geometric
arrangements of various geometrical figures
- Mathematics of homogeneous coordinates
- Relative
position of points and/or line segments
- Ideas for enhancing the video game of Chapter 3.
Chapter 16: Operations on Polygons (page 363)
-
Window clipping
- Position of a point with respect
to a convex or nonconvex polygon
- Clipping a line
segment by a convex polygon
- Clipping of Polygons
Chapter 17: Splines (page 384)
-
Need for Curves whose shape can be determined
through simple user interaction
- Examples of
interactive curve drawing and editing
- Parabolic
splines
- Cubic splines
Chapter 18(*): Advanced Plotting through Xlib (page 411)
-
Arc Plotting
- Polygon Plotting
- Use of Pixmaps
for intermediate plotting
- Polygon Filling
- Fill
Patterns Regions
- Region Algebra
Chapter 19: Projections and Visibility (page 430)
-
Introduction to three dimensional graphics
- Homogeneous coordinates in three dimensions
- Projections (finding plane descriptions for objects
defined in space)
- Brief discussion of visibility
(finding which objects may obscure others) and ray
tracing (finding what is seen from a point on the
display screen).
Chapter 20: Full Pictures (page 452)
-
Definition of the term Full Pictures
- Real and
synthetic full pictures
- Scanning and Displaying
- Dealing with Jaggies (``anti-aliasing'')
-
Colormaps for full pictures
- Display tools
Chapter 21: Halftoning (page 474)
-
Techniques for displaying full pictures in a way
that they appear to have a larger variety of
colors and intensity than the display device is
capable of providing
- Dither halftoning
- Error
Diffusion Halftoning
- Color halftoning.
Chapter 22(*): Image Display through Xlib (page 494)
-
Colormaps and Visuals
- The Xlib XImage function
and its use to display full images and halftones
-
Drawing on Tiles