Goals Give student some idea what this class is about

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

CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Intro and Chapter 1 Goals Give student some idea.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Chapter 2 Chapter 2: GUI API.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Chapter 4 Chapter 4: Working with Graphics APIs.
2012 National BDPA Technology Conference Creating Rich Data Visualizations using the Google API Yolanda M. Davis Senior Software Engineer AdvancED August.
Mr C Johnston ICT Teacher BTEC IT Unit 06 - Lesson 02 Types of Programming Language.
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Lecture 5: Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
(c) University of Washington08-1 CSC 143 Models and Views Reading: Ch. 18.
Lecture 11: Exam Revision 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271  Coursework.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Chapter 5 Chapter 5: MVC Architecture.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
What is Visual Basic.NET? 110 B-1 e.g. a word processor doesn’t do anything until the user clicks on a button, types text... A programming language that.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
11 General Game Programming Approach. The program is event-driven The program is event-driven –Messages = events –So as all windows system (for example.
CS324e - Elements of Graphics and Visualization Timing Framework.
INFORMATION SYSTEM – SOFTWARE TOPIC: GRAPHICAL USER INTERFACE.
MiniDraw Introducing a Framework... and a few patterns.
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
Dive Into® Visual Basic 2010 Express
Introducing a Framework ... and a few patterns
Chapter 1 Introduction.
Support for the Development of Interactive Systems
Topics Graphical User Interfaces Using the tkinter Module
Event Loops and GUI Intro2CS – weeks
CompSci 230 S Software Construction
PYGAME.
Introduction to Programming and Visual Basic
Learning to Program D is for Digital.
GUI Design and Coding PPT By :Dr. R. Mall.
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
Chapter Topics 15.1 Graphical User Interfaces
Event-driven programming
Event loops 16-Jun-18.
Lesson 5-2 AP Computer Science Principles
CSC461 Lecture 8: Input Devices
1. Introduction to Visual Basic
Understanding an App’s Architecture
Haritha Dasari Josue Balandrano Coronel -
Ellen Walker Hiram College
Chapter 2: GUI API Chapter 2.
Event Driven Programming
Chapter 5: MVC Architecture Chapter 5.
GEOMATIKA UNIVERSITY COLLEGE CHAPTER 2 OPERATING SYSTEM PRINCIPLES
Outline Announcements Dynamic Libraries HWII on web, due Friday
Learn… Create… Program
Hands-on Introduction to Visual Basic .NET
Event loops.
Learn… Create… Program
Isaac Gang University of Mary Hardin-Baylor
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Chapter 15: GUI Applications & Event-Driven Programming
Event loops 8-Apr-19.
Model, View, Controller design pattern
Learn… Create… Program
Learn… Create… Program
Event loops.
Input and Interaction Ed Angel Professor Emeritus of Computer Science,
Event loops.
Event loops 19-Aug-19.
Chapter 1 Introduction.
Intro to Programming (in JavaScript)
Presentation transcript:

Goals Give student some idea what this class is about Start Event Driven Programming if possible By programming with simple “language”, understand some existing algorithm, appreciation for algorithm design/development, tool: take home Intro and Chapter 1

What is this class about Building interactive graphics applications Ask: "What is interactive"? real time "What is graphics"? visualization of geometry human as IO device Intro and Chapter 1

What is non-interactive application? Show ray tracer and output BumpScene/color.jpg - the color file BumpScene/CommandFile.Bump - to bump the file BumpScene/BumpImage.Color.jpg - color rendered image BumpScene/BumpImage.BumpOut.jpg - bumped file sacrifice time for quality (always true) animated movies are not done with "real time interactive" Intro and Chapter 1

Results: Demo Demo a couple of previous year's project FORMS! need to sign form to have projects posted. major difference with simple games: we do LOTS of unnecessary work!!. e.g., transformation multiple views real collision proper software architectural structure Our projects also lack in fun! Intro and Chapter 1

Results: Expectations Past good students get job at games company: Difficult to get graphics (or game) specific jobs This is A LOT of work! Make sure you understand each assignment! the assignments build on each other) Large source code it helps if you like programming! Intro and Chapter 1

Our approach: Learn concepts (transformation) See how implemented You: Use the implementation in more complex applications Implement some of the concepts not shown in tutorials Intro and Chapter 1

Language and API Language: JavaScript GUI API: HTML5 + AngularJS Java, C#, C++ trick is lanaguge, GUI and Graphics API are tightly related. GUI API: HTML5 + AngularJS WinForm (for C#), MFC/WPF (C++), GLUT/FLTK (OpenGL) Swing (Java) Graphics API: WebGL D3D: C++ and Microsoft OpenGL: C++ the rest of the world XNA Framework or MonoGame (only with C#) Intro and Chapter 1

Tutorials: Start simple (few files) builds up over the quarter (100+ files) Most of the code will be provided to you In the forms of software library: We will build this over the quarter Intro and Chapter 1

Provided source code: You NEED to understand the implementation of the source code provided to you! If your program does not work because of the library: it is your fault! Source is provide for you, you should fix the problem! Intro and Chapter 1

Learning from source code: User of source code Learn how to build applications by calling the provided functions Evaluator of the source code Use the provided source code, and Evaluate: what is good, why is it bad Developer of your own system Use the provided source as an example prototype Develop your own supporting library MOST REWARDING! Time demanding! Intro and Chapter 1

Let begin! Ball shooting program (Tutorial 5.6) Ask ourselves, what are needed to implement this program? Intro and Chapter 1

Control driven programs Intro and Chapter 1

More detailed parsing … Intro and Chapter 1

Concerns Complexity of our code Efficiency Number of events! Un-handled events! (expose, iconize, …) Efficiency constantly waiting for the user Repeating of similar work across applications (e.g., iconize) Intro and Chapter 1

Event driven programming No notion of main() function! Instead: have a MainEventLoop() function … Intro and Chapter 1

Main Event Loop Intro and Chapter 1

Interesting differences MainEventLoop() is not ours! We as programmer, we cannot change this function!! Instead, we have to program _with_ this function! What happens at Label A? and How to define “service routine”? Interesting points: Label B: loop forever!! When will your program ever quit? Label C: wait (instead of busy loop) Label D: every event has a default action Intro and Chapter 1

Event Driven Program Intro and Chapter 1

Pseudo Code … Intro and Chapter 1

Event Program structure Application State Well defined Persist over function calls Service of Events To change the application state Optional: kind of nice to have displaying of application state Intro and Chapter 1

Event: Origin and Handling Operating System and Window Manager Windows (Integrated system) Unix + X Windows with twm, mwm, etc. GUI API Graphical User Interface Application Programming Interface Define GUI Element for handling events Intro and Chapter 1

GUI Elements: Virtual/Abstract IO devices Windows, Buttons, Slider bars, etc. Associated with each GUI element, there are a set of defined events: E.g., Button: click, release, double click, etc. E.g., Window: mouse over, mouse move, etc. As programmer, we can: Ignore events from a GUI element or Service events from a GUI element Intro and Chapter 1

Events:Categories User: generated events Application generated events Application specific: LMB click/drag We should service this General: iconize Window manager will service this Application generated events Timer: we should service this External: GUI state change: E.g., SystemInitialization() Select interested ones to service Window Environment: E.g., Exposure Request Collaboration: E.g., Redraw events Must service! Intro and Chapter 1

Event Service registration Callback function registration (A2) Define the call back functions (D1) Intro and Chapter 1

Event Service Routines Service one state and return Stateless!! Should not contain presistent variables Verify invocation conditions Error checking Our tutorials has serious problem with lack of error checking!! Intro and Chapter 1

Event Service: Ball Shoot Application state + Registration Intro and Chapter 1

Event service: Ball shoot Intro and Chapter 1