Visualization Recreate the ping pong scene in 3D using ball and racket coordinates.

Slides:



Advertisements
Similar presentations
Department of nskinfo i-education
Advertisements

GR2 Advanced Computer Graphics AGR
SI23 Introduction to Computer Graphics
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
1 Computer Graphics Week6 –Basic Transformations- Translation & Scaling.
Processing Processing is a simple programming environment that was created to make it easier to develop visually oriented applications with an emphasis.
MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Today: - MAT 594CM Forums (Ritesh) - Problem Set #1 online, due April 15th - Need.
What is OpenGL? Low level 2D and 3D Graphics Library Competitor to Direct3D (the rendering part of DirectX) Used in: CAD, virtual reality, scientific.
1 3D modelling with OpenGL Brian Farrimond Robina Hetherington.
#4: OpenGL Implementation & Project 2 CSE167: Computer Graphics TAs: Alex Kozlowski & Cameron Chrisman UCSD, Winter 2006.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Informationsteknologi Tuesday, November 6, 2007Computer Graphics - Class 41 Today’s class Input and interaction.
Introduction to OpenGL Pipeline From Programmer View Tong-Yee Lee.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
Introduction to OpenGL Jian Huang This set of slides are extracted from the Interactive OpenGL Programming course given by Dave Shreine, Ed Angel and Vicki.
Using Graphics Libraries Lecture 3 Mon, Sep 1, 2003.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Graphics Graphics Korea University cgvr.korea.ac.kr Introduction to Computer Graphics.
INTRO TO COMPUTER GRAPHICS TEXT EDWARD ANGEL: EDITION 5 CS770/870
Andy Wilson - GLUT and GLVU - 9/99 - Slide 1 GLUT and GLVU Andy Wilson September 22, 1999.
CSE 381 – Advanced Game Programming Basic 3D Graphics
OpenGL Shading Language (Advanced Computer Graphics) Ernest Tatum.
Image Synthesis Rabie A. Ramadan, PhD 2. 2 Java OpenGL Using JOGL: Using JOGL: Wiki: You can download JOGL from.
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
Graphics Systems and OpenGL. Business of Generating Images Images are made up of pixels.
Computer Graphics, KKU. Lecture 101 Introduction to OpenGL.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
 “OpenGL (Open Graphics Library) is a standard specification defining a cross- language cross-platform API for writing applications that produce 2D and.
1 Figures are extracted from Angel's book (ISBN x) The Human Visual System vs The Pinhole camera Human Visual System Visible Spectrum Pinhole.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
NEWTON’S CRADLE CADENAS QUIJANO, PATRICIA COTRINA FERNÁNDEZ, MANUEL GARCÍA TOMILLO, JAVIER HIJARRUBIA BERNAL, LUIS An OpenGL Application.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
Dr. Ken Hoganson, Kennesaw State University Introduction to the Torque Game Development System.
Computing & Information Sciences Kansas State University Lecture 19 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 19 of 42 William H. Hsu.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
3D Computer Graphics in a Nutshell Guillaume Caumon, January 2002.
Introduction to OpenGL and GLUT. What’s OpenGL? An Application Programming Interface (API) A low-level graphics programming API – Contains over 250 functions.
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.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
1 Graphics CSCI 343, Fall 2015 Lecture 6 Viewing, Animation, User Interface.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
The Camera Analogy ► Set up your tripod and point the camera at the scene (viewing transformation) ► Arrange the scene to be photographed into the desired.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
Computer Science I 3D Classwork / Homework: plan and implement your own 3D example.
 Learn some important functions and process in OpenGL ES  Draw some triangles on the screen  Do some transformation on each triangle in each frame.
Lecture 2: Introduction to OpenGL
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Lecture 2 Review OpenGL Libraries Graphics Overview Rendering Pipeline OpenGL command structure.
CS552: Computer Graphics Lecture 6: Viewing in 2D.
Lecture 7 Midterm Review. OpenGL Libraries gl: Basic OpenGL library, e.g. primitives. glu: OpenGL Utility library, a set of functions to create texture.
GL transformations-models. x' = x+t x y' = y+t y z' = z+t z t x t y s x =s y =s z t z uniform nonuniform?!!?? x' = x·s x y' =
Introduction to Graphics Programming. Graphics API.
TA: Ryan Freedman Sushma Kini Chi Zhou.  Due Date: March , 12:30 PM  We want a zip folder named cs418_mp1_{netid}.zip which contains  Source.
Graphics Programming. Graphics Functions We can think of the graphics system as a black box whose inputs are function calls from an application program;
OpenGL: The Open Graphics Language Technology and Historical Overview By Ricardo Veguilla.
Introduction to 3-D Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 27, 2003.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Introduction of OpenGL - 3D Graphic and Animation
School of Computer Science
“Computer Science is no more about computers than astronomy is about telescopes.” Professor Edsger Dijkstra.
The User Interface Lecture 2 Mon, Aug 27, 2007.
Introduction to OpenGL
Computer Graphics 3Practical Lesson
Presentation transcript:

Visualization Recreate the ping pong scene in 3D using ball and racket coordinates

Choosing an adequate platform C++ Scientific data visualization Limited animation capabilities Few online examples available C++ Game development Variety of online examples

OpenGL + GLUT GLUT = OpenGL Utility Toolkit –I/O operations –Opening a window and handling resizes –Executing the actual OpenGL code –Mouse controls and keyboard interaction –Façade functions that combine several basic OpenGL routines

OpenGL Rendering Pipeline Listing of points, lines and basic primitives Transformations, lighting and clipping non-visible parts from the scene Conversion into fragments, each fragment square corresponds to a pixel in the frame buffer.

Drawing the table Within glBegin(GL_QUADS) block –Specifies that quadrangle points follow below Using glVertex3f-function –Calling this function for every angular point In combination with glNormal3f –Specifies the direction of the normal glNormal3f( 1.0f, 0.0f, 0.0f); // Normal Facing Right glVertex3f( 1, -1, -1);// Bottom Right glVertex3f( 1, 1, -1);// Top Right glVertex3f( 1, 1, 1);// Top left glVertex3f( 1, -1, 1);// Bottom left

Animating the ball movement Only possible to draw spheres with void glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); Specifing the location: multiplying the table matrix with a matrix that moves the object glTranslatef(x, y, z); Then draw the ball Do this for every 3D ballcoordinate

Displaying the rackets Same strategy as with the ball movement Drawing a cylinder at a specified position Coordinates are in a separate CSV file

Animation (1) Key frame animation Movie is 25 frames per second (40 ms) Animation has a 10 ms refresh rate At least 4 times the coordinates as in the movie Redrawing the ball using an (interpolated) xyz-coordinate (generated in WP4)

Animation (2) Regulating speed: skipping coordinates List of coordinates fuels: –Rewind/forward –Pause/play –Tracers –Special camera positions

Camera placement (1) Use the Utility Library (GLUT) routine gluLookAt() to define a line of sight –Encapsulates a series of rotation and translation commands gluLookAt(4.0, 2.0, 1.0, 2.0, 4.0, -3.0, 2.0, 2.0, -1.0); Fully adjustable camera angles: –Rotating the view (around all axis) –Dragging table (up, down, left, right) –Zooming Cam. posUp vectorCenter (ref. point)

Camera placement (2) First-person ball tracking using recently displayed coordinates

Functionality Continuous rotation Tracers –Use already displayed coordinates and draw a stippled line between each pair

Demo Using mouse & keyboard controls to interpret commands

Improvements Anti-aliasing Enhancing the coordinates by using a physics engine –Calculating accurate speed –Simulating gravity –Simulating air resistance

Conclusion Visualization runs smoothly Success or failure depends on accurate 3D coordinates