Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Microsoft® Small Basic
1 Computer Graphics Chapter 2 Input Devices. RM[2]-2 Input Devices Logical Input Devices  Categorized based on functional characteristics.  Each device.
DESCRIBING INPUT DEVICES
Microsoft® Small Basic
ITEC220 GUI Lecture – Part 2 References  Java Software Solutions,” by Lewis & Loftus  Chapter 7  Chapter 8  Chapter 9  Java Foundations-Introduction.
Windows XP Basics OVERVIEW Next.
XX/XX/XX Presenter names Position Title Accessibility “How to”
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Automating Tasks With Macros
Using Powerpoint to Create Interface Prototype Copy & Paste Interface Designs –Use Screen Capture to Copy Existing Interface –“Print Screen / SysRq” Button:
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
Based on slides created by Edward Angel
Informationsteknologi Tuesday, November 6, 2007Computer Graphics - Class 41 Today’s class Input and interaction.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
CS 480/680 Computer Graphics Programming with Open GL Part 8: Working with Callbacks Dr. Frederick C Harris, Jr. Fall 2011.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
1 Perception and VR MONT 104S, Spring 2008 Lecture 22 Other Graphics Considerations Review.
Interactive Input Methods & Graphical User Input
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
CGMB214: Introduction to Computer Graphics
1 Working with Callbacks Yuanfeng Zhou Shandong University.
WORKING WITH CALLBACKS Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Lecture 5: Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
School of Computer Science University of Seoul. 1. Interaction 2. Input Devices 3. Clients and Servers 4. Display Lists 5. Programming Event-Driven Input.
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
1Computer Graphics Input and Interaction Lecture 8 John Shearer Culture Lab – space 2
FLTK Help Session By Richard Yu Gu CS 638 -Graphics Fall, 1999.
1 Input and Interaction. 2 Input Devices Physical input devices Keyboard devices and pointing devices Logical input devices.
Computer Graphics I, Fall 2010 Input and Interaction.
CS 480/680 Computer Graphics Programming with Open GL Part 7: Input and Interaction Dr. Frederick C Harris, Jr. Fall 2011.
A computer is an electronic machine. It helps us to do work faster and easier.
Spring 2010Topics in Computer Graphics FLTK and OpenGL Jyun-Ming Chen.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Program 2 due 02/01  Be sure to document your program  program level doc  your name  what the program does  each function  describe the arguments.
1 Input and Interaction. 2 Objectives Introduce the basic input devices ­Physical Devices ­Logical Devices ­Input Modes Event-driven input Introduce double.
More on GLUT Programming Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September 15, 2003.
Interactive Frequency Filtering Program Geoff Franz.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Computer Graphics I, Fall 2010 Working with Callbacks.
University of New Mexico
GLUT functions glutInit allows application to get command line arguments and initializes system gluInitDisplayMode requests properties for the window.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Graphics Programming. Graphics Functions We can think of the graphics system as a black box whose inputs are function calls from an application program;
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Working with Callbacks.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Computer Graphics Lecture 1 Introduction to Computer Graphics
Layers in Adobe After Effect
Working with Callbacks
Introduction to Event-Driven Programming
CSC461 Lecture 8: Input Devices
Lesson 1: Buttons and Events – 12/18
Advanced Menuing, Introduction to Picking
Interactive Input Methods & Graphical User Input
Working with Callbacks
GRAPHICAL USER INTERFACE
Isaac Gang University of Mary Hardin-Baylor
Input and Interaction Ed Angel
Interactive Input Methods & Graphical User Input
University of New Mexico
Input and Interaction Ed Angel
Input and Interaction Ed Angel Professor Emeritus of Computer Science,
Presentation transcript:

Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College PowerPoint Instructor’s Resource

Events and Interactive Programming Giving the user the ability to manipulate the scene and image

Interaction is Important in Computer Graphics It can give the user control of parts of the images you create It can give the user control of some of the processes that go into the images It is the basis of the interfaces that you can add to your programs

Interaction in OpenGL is Based on Events An event is a change in the control state of a computer system This definition is very general, but it includes all the events needed for graphics Events come from devices, from programs, and from the system itself

Event Handling Events cause event records to be posted to the event queue The system removes event records from the queue and takes actions Many event actions are done via callback functions

Events for Graphics Keypress events –Keyboard –Special Menu events Mouse events –Mouse motion –Mouse buttons Software events System events Window events

Meanings of Interaction Keyboards –Discrete input –Key choice can have semantic meaning Identify object or action Mouse –Position identifies points spatially –Motion is continuous Can identify continuous motion or selection from continuous choices

Object Selection This is an important activity in graphics The user selects an object by selecting a point on the screen You must then identify the object that corresponds to that point The point gives you a line in eye space, and you could calculate all intersections: could be difficult!

Object Selection (2) You could keep the question in screen space by identifying the pixel chosen Then as the scene is drawn, you could keep track of any object that uses that pixel and the depth of that pixel Finally you could identify the correct object from those by using the depth value Not so difficult with system support

Events and the Scene Graph The scene graph, to now, has defined a scene statically However, it is not difficult to let any part of the scene graph vary Events could be used to identify the part of the scene graph and how it is to change –Change geometry, change transformations, change appearance

Interaction and Visual Communication The main reason we make images is to communicate with our audience Interaction offers rich choices for communication –Changing the view –Changing the scene Critical that the way we create the interaction is consistent with the way the audience thinks of the action

Events in OpenGL Idle Display Reshape Keyboard Special Menu Mouse active motion Mouse passive motion Timer

Selection in OpenGL Selections operate by creating hit records in the selection buffer One entry in the record for each object that uses the selected pixel Draw in selection mode instead of render mode Process the record to identify the selection

Selection in OpenGL (2) There are some clever tricks you can use to make selection work better Modify the scene you will draw in selection mode –Only draw things that can be selected –Draw simplified versions of these things –Can even draw invisible controls!

Selection in OpenGL (3) There is a completely different approach using the back buffer –Draw everything that can be selected –Use simplified versions –Draw each object in a unique color –Look at the selected pixel in the final back buffer –The color of the pixel will tell you what object is nearest the viewer; this is usually the one you want

User Interaction Toolkits There are many toolkits that have been built on top of OpenGL They let you create widgets -- buttons, text boxes, sliders, dials, … that the user can manipulate They usually operate by letting you create a separate window where you lay out the controls

MUI MUI is a particular user interaction toolkit It’s very simple, but very easy to use This figure shows the look of a MUI control panel

MUI (2) An example of a simple MUI application