Milestone 2 Overview.

Slides:



Advertisements
Similar presentations
Chapter 16 Graphical User Interfaces
Advertisements

2D Graphics Drawing Things. Graphics In your GUI, you might want to draw graphics E.g. draw lines, circles, shapes, draw strings etc The Graphics class.
Microsoft ® Office Training Get up to speed with the 2007 system presents:
Chapter 16 Graphical User Interfaces John Keyser’s Modifications of Slides by Bjarne Stroustrup
BGI graphics library And Visual Studio.
Intro to Microsoft PowerPoint 2010 Public Computer Center, Moore Memorial Library, Greene, NY.
CS 4731 Lecture 2: Intro to 2D, 3D, OpenGL and GLUT (Part I) Emmanuel Agu.
Aim: Use the given examples to record examples and our own ideas in our journal 1.Write technical examples in journal and/or participate in full.
What is OpenGL? Low level 2D and 3D Graphics Library Competitor to Direct3D (the rendering part of DirectX) Used in: CAD, virtual reality, scientific.
IAT 800 Lab 1: Loops, Animation, and Simple User Interaction.
Event Handling. In this class we will cover: Keyboard Events Mouse Events Focus Events Action Interface Multicasting.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
A Prezi presentation is like creating a mind map. It is created on a blank canvas and you decide where the information goes on this canvas.
Microsoft Visual Basic 2012 CHAPTER TWO Program and Graphical User Interface Design.
COMPUTER GRAPHICS Prepared by S.MAHALAKSHMI Asst. Prof(Sr) / SCSE VIT University.
Inspire students to develop ideas & organize thinking
Events and Coordinates Lecture 5 Fri, Sep 5, 2003.
Prepared by Fareeha Lecturer DCS IIUI 1 Windows API.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Visual Basic 2005 CHAPTER 2 Program and Graphical User Interface Design.
1Computer Graphics Input and Interaction Lecture 8 John Shearer Culture Lab – space 2
Lecture 3 OpenGL.
1 Input and Interaction. 2 Input Devices Physical input devices Keyboard devices and pointing devices Logical input devices.
COMP106 Assignment 2 Proposal 1. Interface Tasks My new interface design for the University library catalogue will incorporate all of the existing features,
MA/CS 3751 Fall 2002 Lecture 24. MA/CS 3752 ginput ginput is a Matlab function which takes one argument input: number of points to select in the image.
Lecture Manipulating Graphics w/ Paint.Net. What is Paint.Net? Paint.NET is free image and photo editing software for computers that run Windows. It features.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
Microsoft Office Publisher A User-Friendly Publishing Program For Varied Projects.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
Administration Upcoming deadlines –Milestone 1 code due Monday Feb. 2 –Graphics proposal document: due Friday, Feb. 13 –Milestone 2 on web: due Monday,
Programming in the Simple Raster Graphics Package (SRGP) Chapter 2.
Microsoft Visual Basic 2010 CHAPTER TWO Program and Graphical User Interface Design.
Mapping local community assets online Read this if you want to learn how to: 1)Create online maps of local community assets using Google Maps 2)Allow other.
PowerPoint Basics Tutorial 2: A Slide Show In this tutorial you’re going to create a presentation from scratch. You will have to keep this presentation.
Learning the Basics of ArcMap 3.3 Updated 4/27/2010 Using Arc/View pt. 1 1.
More Graphics. Hit Testing Mouse clicked here What did I click on?
Manipulating Graphics w/ Paint.Net
The New User Interface MEDITECH Training & Education.
Using ArcGIS Layout View
Microsoft Visual Basic 2005: Reloaded Second Edition
Microsoft Access 2007 – Level 2
Human Computer Interaction Lecture 07 The Interaction
SketchUp Chocolate Level of Difficulty Time
Introduction to Microsoft Access
World Coordinate System: You Choose!
INTERACTIVE TRANSPARENCY BUILDING A Character IN ANIMATION
Program and Graphical User Interface Design
CSC461 Lecture 8: Input Devices
Creating, Formatting, and Editing a Word Document with Pictures
Introduction to Events
Microsoft Office PowerPoint 2010 INSERTING GRAPHIC OBJECTS
The User Interface Lecture 2 Mon, Aug 27, 2007.
The iD Editor Beginners Guide.
Microsoft Official Academic Course, Microsoft Word 2016
Program and Graphical User Interface Design
Computation as an Expressive Medium
AN INTRODUCTION TO: POWERPOINT.
Inserting Pictures and Symbols in Word documents
More programming with "Processing"
Learning the Basics of ArcMap 3.3 Updated 4/27/2010
Microsoft Office Ribbon
European Computer Driving Licence
Introduction to PowerPoint
Directions are in slide notes. You can view them in two ways
Creating Additional Input Items
PowerPoint Tutorial 1 Creating a Presentation
Milestone 2 Overview.
Add some WordArt to your cover slide
Digital Mapping Welcome to a short presentation on how to create a very basic event route using digital mapping. In this example, we will be using Quo.
Presentation transcript:

Milestone 2 Overview

Milestone 2 Interactive map visualization Open ended Specification is loose  you fill in the details Taught: basics of graphics, data structures and using OSM data For best solution: must learn more & come up with own ideas Different than (most) labs Labs: apply what you have learned in lecture Design: go beyond what you have been taught

FeatureType = Building Milestone 2: API Layers Two layers of database interface Layer 2: used in milestone 1 Must visualize all data in this layer Streets, street names, one-way, points-of-interest, features, … FeatureType = Park FeatureType = Building

Layer 1 API New layer 1 API All OSM data Less structure Optionally can use to visualize more E.g. subway stations Requires reading OSM docs & experimentation

M2 Basic Requirements Visualize everything in the layer 2 (StreetsmapDatabaseAPI.h) API Click on an intersection for extra data Find button to locate intersections by name Load any map without recompilation Graphics must be fast & interactive Detail must not overwhelm user  key info understandable at each zoom / option level Challenge: user can find all the detailed info (somehow in some view) and the big picture is still clear

M2 Grading Code style: 1/13 Basic features: 5/13 Responsiveness, usability, aesthetics: 4/12 Sample challenge: display street names well Which streets to label at which zoom? How often to label along the street? Extra feature(s): 3/12 Display more information from layer 1 API? More “clickable” features (streets, parks, …)? Find with partial name matches? (e.g. Yonge  Yonge) Your ideas? Don’t hard-code: we will test many maps

Good Extra Feature? Change colour scheme? Pinkify button Difficulty matters!

Graphics Proposal & Milestone 2 Starting a new project  make a proposal Survey the landscape Background research How do others make GIS’ interactive and usable yet detailed? What makes user interfaces intuitive? How fast must a UI be to feel interactive? Make a plan What will you do? How will you use or differ from the background research? How will you measure success? Goals / Testing Does the background research give you ideas here? Never skip this step! Use credible research

Intro to Graphics

Different for different platforms Graphics APIs myProg.exe Low level APIs Different for different platforms win32 API x11 & cairo APIs PostScript

Graphics APIs myProg.exe Solution: another layer Higher level API Can target multiple low-level APIs win32 API X11 & cairo APIs PostScript

(simple, cross-platform graphics) Graphics APIs myProg.exe This course: EasyGL (simple, cross-platform graphics) win32 API x11 & cairo APIs PostScript

EasyGL Overview #include “graphics.h” In any file where you want to make graphics calls Add remaining .cpp/.h files in your project, and some libraries in your build step See EasyGL quick start guide and example code/makefile First call: set up window init_graphics (“Some example graphics”, WHITE); Second call: choose your coordinate system set_visible_world (xleft, ybottom, xright, ytop); Window title Background colour

EasyGL Overview Draw primitives Set drawing attributes setcolor (int color_index); // E.g. BLUE (== 9) setcolor (red, green, blue); // red, green and blue are 8-bit integers // e.g. (0, 0, 255) is also blue setcolor (red, green, blue, alpha); // alpha of 255 is opaque (default), 0 is transparent setlinewidth (3); // 3 pixels wide setlinestyle (DASHED); sticky: affect all subsequent drawing until changed Draw primitives drawline (x1, y1, x2, y2); fillrect (lower_left_pt, upper_right_pt); ...

Issue: Interaction? myProg.exe How to pass this information to myProg.exe? This course: EasyGL (simple, cross-platform graphics) Graphics drawing: myProg.exe calls functions Hardware receives the input and X11 knows there is an event x11 API User resizes window or User clicks on a button

Solution: Callbacks EasyGL checks the event queue and calls the appropriate callback  now myProg.exe can handle it. myProg.exe This course: EasyGL (simple, cross-platform graphics) myProg.exe registers callback functions for various events Hardware receives the input and X11 inserts event into event queue x11 API Then hands control to EasyGL User resizes window or clicks on a button …

Handing Control to EasyGL Optional callbacks: not using here Callback function to redraw the screen. int main () { ... event_loop (NULL, NULL, NULL, draw_screen); void draw_screen (void) { // Your screen redraw function. clearscreen (); // Erase old graphics. // Should always be first line setcolor (RED); fillpoly (...); my_drawing_func1 (); } Any name you want, but must have the right function prototype

Your drawing calls (drawline etc.) render here (graphics area) event_loop () EasyGL made and manages these buttons Zooming & Panning: EasyGL adjusts how your drawing appears on screen to zoom & pan

event_loop () calling event_loop()  hands control to EasyGL event_loop () does not return until you hit the Proceed button Use update_message (string) to put text here

Other Callbacks: Mouse Button Presses Called when a mouse button pressed in the graphics area int main () { ... event_loop (act_on_mouse_button, NULL, NULL, draw_screen); void act_on_mouse_button (float x, float y, t_event_buttonPressed buttonPressed) { cout << “Mouse press at (“ << x << “,” << y << “)\n”; if buttonPressed.ctrl_pressed cout << “Ctrl was held down too!\n”; } mouse button callback must have this function signature where did the user click? In world coordinate system

More Optional Callbacks Optional callbacks for when a keyboard key is hit (keypress) and when the mouse is moved in the graphics area int main () { ... event_loop (act_on_mouse_button, act_on_mousemove, act_on_keypress, draw_screen); void act_on_mousemove (float x, float y) { // x and y are the coordinates of the cursor in // world coordinates . . . // Do something ... } void act_on_keypress (char key_pressed, int keysym) { // This key was just pressed. Do something! . . . Regular characters, e.g. ‘q’ Special characters, e.g. left arrow

Notes Graphics can be buffered Nothing guaranteed to appear until you call event_loop () or flushinput () You can make your own buttons with create_button () Give each a callback function for when it is pressed ECE 244 Used a simplified wrapper to EasyGL This course: all routines available

Cleaning Up Last call: close down window close_graphics (); Some systems (e.g. vnc) don’t properly restart graphics after a close_graphics call Safest to call init_graphics () once at start of program And call close_graphics () once at end