DREXEL CS 480 - Lecture6 (71 pages)

Previewing pages 1, 2, 3, 4, 5, 33, 34, 35, 36, 67, 68, 69, 70, 71 of 71 page document View the full content.
View Full Document

Lecture6



Previewing pages 1, 2, 3, 4, 5, 33, 34, 35, 36, 67, 68, 69, 70, 71 of actual document.

View the full content.
View Full Document
View Full Document

Lecture6

69 views

Lecture Notes


Pages:
71
School:
Drexel University
Course:
Cs 480 - ST:Autonomous Agents
ST:Autonomous Agents Documents

Unformatted text preview:

CS 480 680 INTERACTIVE COMPUTER GRAPHICS Picking and Curves Week 6 David Breen Department of Computer Science Drexel University Based on material from Ed Angel University of New Mexico Objectives Picking Select objects from the display Introduce types of curves and surfaces Explicit Implicit Parametric Strengths and weaknesses Discuss Modeling and Approximations Conditions Stability Angel Interactive Computer Graphics 3 E Addison Wesley 2002 2 Picking Identify a user defined object on the display In principle it should be simple because the mouse gives the position and we should be able to determine to which object s a position corresponds Practical difficulties Pipeline architecture is feed forward hard to go from screen back to world Complicated by screen being 2D world is 3D How close do we have to come to object to say we selected it Angel Interactive Computer Graphics 3 E Addison Wesley 2002 3 Three Approaches Hit list Most general approach but most difficult to implement Use back or some other buffer to store object ids as the objects are rendered Rectangular maps Easy to implement for many applications Divide screen into rectangular regions Angel Interactive Computer Graphics 3 E Addison Wesley 2002 4 Using another buffer and colors for picking For a small number of objects we can assign a unique color often in color index mode to each object We then render the scene to a color buffer other than the front buffer so the results of the rendering are not visible We then get the mouse position and use glReadPixels to read the color in the buffer we just wrote at the position of the mouse The returned color gives the id of the object Angel Interactive Computer Graphics 3 E Addison Wesley 2002 5 Using Regions of the Screen Many applications use a simple rectangular arrangement of the screen Example paint CAD program Easier to look at mouse position and determine which area of screen it is in that using selection mode picking tools drawing area menus Angel



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Lecture6 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture6 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?