New topic for Java course: Introduction to 3D graphics programming
|
|
- Allison Hunter
- 5 years ago
- Views:
Transcription
1 New topic for Java course: Introduction to 3D graphics programming with JOGL Dejan Mitrović Prof. Dr Mirjana Ivanović AGENDA 1. Motivation and goals 2. JOGL 3. Proposed subjects 4. Conclusions 2/29 1
2 1.1. Motivation Game development represents a large portion of the software development industry, BUT, so far very few programming courses given at our Department were focused at this area The proposed set of subjects constitutes a small part of the recently updated Computer graphics course, which has received high grades from students 3/ Goals Provide students with an opportunity to practice Java programming and extend their OO programming skills in an exciting environment Introduce the proposed set of subjects near the end of the introductory, or at the beginning of the advanced OO course, depending on the students progress over the semester Give them a solid background for later, more advanced topics of the Computer graphics course 4/29 2
3 AGENDA 1. Motivation and goals 2. JOGL 3. Proposed subjects 4. Conclusions 5/ Why JOGL? Based on OpenGL a professional, powerful, free, crossplatform graphics programming library Straightforward integration with other GUI and graphics Java APIs and libraries (e.g. Swing, Java2D) Can serve as an example of how an OO system should not be designed 6/29 3
4 2.2. JOGLext: A JOGL extension library A library of helper classes built on top of JOGL Handles common, boring, but necessary tasks, includes functions for vector and matrix based calculations, etc. Purpose: enable students to develop simple 3D applications without any (mathematical or game programming) background Although, experience in playing FPS games can prove valuable for 3D camera handling 7/ Core JOGLext classes JoglFrame: a base class for all students applications, handles display mode changes, precise timing measurements, various maintenance tasks, etc. Camera: a flexible, programmable, FPS like 3D camera for navigation through generated scenes Mesh: a framework for loading and rendering external complex 3D models 8/29 4
5 AGENDA 1. Motivation and goals 2. JOGL 3. Proposed subjects 4. Conclusions 9/29 3. Proposed subjects 1. Introduction to 3D graphics programming (1 hour lesson) 2. 3D rendering basics (1 hour lesson) 3. World transformations (2 hours lesson) 4. Texturing (2 hours lesson) 5. Complex 3D models (2 hours lesson) 10/29 5
6 3.1. Introduction to 3D graphics programming What is a graphics programming library? Introduction to OpenGL and JOGL Elements of a 3D application: frustum definition, overview of projection and viewing transformations, viewports, etc. Main classes of JOGLext, creating a very first 3D application by implementing methods of JoglFrame 11/ Example: HelloWorld3D public class HelloWorld3D extends protected void initialize(gl gl, Color4f back, Vector3f camerapos, Vector3f cameradir) // TODO : initialize camera, set clear protected void render(gl gl, double elapsedtime) // TODO : perform rendering public static void main(string[] args) HelloWorld3D hw = new HelloWorld3D(); // Caption: Hello World 3D // Frame width: 640px // Frame height: 480px // Fullscreen mode: false hw.start("hello World 3D", 640, 480, false); 12/29 6
7 3.1. Results 13/ D rendering basics Coordinate system and 3D object specification using vertices Methods glvertex3f() and glcolor3f() Different modes of rendering with glbegin() and glend(): triangle lists, strips, and fans, quads, and polygons Rendering built in objects with GLUT Basic 2D text rendering with TextRenderer 14/29 7
8 3.2. Example: Hexagon public class Hexagon // vertices definition private static final Vector3f[] vertices = new Vector3f[] new Vector3f( 0.0f, 0.0f, 0.0f), new Vector3f(-1.0f, 0.0f, 0.0f), new Vector3f(-0.5f, 1.0f, 0.0f), new Vector3f( 0.5f, 1.0f, 0.0f), new Vector3f( 1.0f, 0.0f, 0.0f), new Vector3f( 0.5f, -1.0f, 0.0f), new Vector3f(-0.5f, -1.0f, 0.0f) ; // each vertex will be of a different color private static final Color4f[] colors = new Color4f[] new Color4f(1.0f, 0.0f, 0.0f), new Color4f(0.0f, 1.0f, 0.0f), new Color4f(1.0f, 1.0f, 0.0f), new Color4f(1.0f, 1.0f, 1.0f), new Color4f(0.0f, 0.0f, 1.0f), new Color4f(1.0f, 0.0f, 1.0f), new Color4f(0.0f, 1.0f, 1.0f) ; 15/ Example: Hexagon (cont.) // method for rendering the n-th vertex private void renderpoint(gl gl, int n, float z) // first set the n-th color, then send the coordinates Color4f c = colors[n]; gl.glcolor3f(c.getred(), c.getgreen(), c.getblue()); Vector3f v = vertices[n]; gl.glvertex3f(v.getx(), v.gety(), z); // using GL_TRIANGLE_FAN for hexagon rendering public void rendertrianglefan(gl gl, float z) // the first 3 vertices make up 1 triangle // every other vertex is connected to the first and the the previous one gl.glbegin(gl.gl_triangle_fan); renderpoint(gl, 0, z); renderpoint(gl, 1, z); renderpoint(gl, 2, z); renderpoint(gl, 3, z); renderpoint(gl, 4, z); renderpoint(gl, 5, z); renderpoint(gl, 6, z); renderpoint(gl, 1, z); gl.glend(); // class Hexagon 16/29 8
9 3.2. Example: 3D Rendering public class HelloWorld3D extends JoglFrame private Hexagon hex = new Hexagon(); private TextRenderer protected void initialize(gl gl, Color4f back, Vector3f camerapos, Vector3f cameradir) // initialize TextRenderer Font font = new Font("Tahoma", Font.BOLD, 12); text = new protected void render(gl gl, double elapsedtime) // render a yellow teapot using GLUT gl.glcolor3f(1.0f, 1.0f, 0.0f); glut.glutsolidteapot(1.0f); // render a colored triangle behind the teapot gl.glbegin(gl.gl_triangles); gl.glcolor3f( 1.0f, 0.0f, 0.0f); gl.glvertex3f(-1.0f, -0.5f, -5.0f); gl.glcolor3f( 0.0f, 1.0f, 0.0f); gl.glvertex3f( 1.0f, -0.5f, -5.0f); gl.glcolor3f( 1.0f, 1.0f, 1.0f); gl.glvertex3f( 0.0f, 0.5f, -5.0f); gl.glend(); 17/ Example: 3D Rendering (cont.) // render a hexagon behind the triangle hex.rendertrianglefan(gl, -10.0f); // render 2D text at the top of the window int w = getwidth(); int h = getheight(); text.beginrendering(w, h); text.setcolor(1.0f, 1.0f, 0.0f, 1.0f); // first line - frame rate, below it - camera position text.draw("fps: " + getfps(), 2, h - 16); text.draw("camera: " + camera.getposition().tostring(), 2, h - 36); // end text rendering text.endrendering(); // render public static void main(string[] args) HelloWorld3D hw = new HelloWorld3D(); hw.start("hello World 3D", 640, 480, false); // class HelloWorld3D 18/29 9
10 3.2. Results 19/ World transformations Motivation behind and the effects of world transformations With just a brief overview of low level matrix math Methods gltranslatef(), glrotatef(), and glscalef() Combining multiple transformations Storing and restoring transformations with glpushmatrix() and glpopmatrix() 20/29 10
11 3.3. Example: SolarSystem public class Planet private float distance; // from the sun private float revolution; // revolution angle private float scale; // size parameter private Color4f color; // color of the planet public Planet(float distance, float revolution, float scale, Color4f color) // ommitted, save parameters public void render(gl gl, GLUT glut) // set the planet color gl.glcolor3f(color.getred(), color.getgreen(), color.getblue()); // every method that changes the world transformation // should always first save the current state and later restore it gl.glpushmatrix(); // rotation around the sun gl.glrotatef(revolution, 0.0f, 1.0f, 0.0f); gl.gltranslatef(distance, 0.0f, 0.0f); // scale the sphere and render it gl.glscalef(scale, scale, scale); glut.glutsolidsphere(1.0f, 25, 25); // restore the original world transformation gl.glpopmatrix(); 21/ Example: SolarSystem (cont.) public class SolarSystem extends JoglFrame private Planet sun, venus, earth, mars; // miniature solar system protected void initialize(gl gl, Color4f backcolor, Vector3f camerapos, Vector3f cameradir) // initialize camera camerapos.assign(1.75f, 17.0f, 38.47f); cameradir.assign(0.0f, -0.49f, -0.87f); // initialize planets sun = new Planet(0.0f, 0.0f, 5.0f, new Color4f(1.0f, 1.0f, 0.0f)); venus = new Planet(10.0f, f, 0.7f, new Color4f(0.59f, 0.3f, 0.0f)); earth = new Planet(15.0f, -80.0f, 1.0f, new Color4f(0.0f, 0.0f, 1.0f)); mars = new Planet(20.0f, -60.0f, 0.5f, new Color4f(1.0f, 0.0f, 0.0f)); protected void render(gl gl, double elapsedtime) sun.render(gl, glut); venus.render(gl, glut); earth.render(gl, glut); mars.render(gl, glut); public static void main(string[] args) // ommitted, the usual 22/29 11
12 3.3. Results 23/ Texturing Textures and texture coordinates Loading, enabling, disabling, and binding textures, assigning coordinates with gltexcoord2f() Method gltexenvf(), and environment modes GL_MODULATE and GL_REPLACE Different ways of applying texture coordinates with GL_CLAMP and GL_REPEAT 2D texture rendering with TextureRenderer 24/29 12
13 3.4. Adding textures to SolarSystem 25/ Complex 3D models The concept of meshes, their organization into submeshes of vertices with shared properties Using the Mesh class for loading and rendering 3D models OBJ file format for storing meshes 26/29 13
14 3.5. The end results 27/29 4. Conclusions Graphics programming with JOGL represents an exciting environment for practicing Java programming and extending students OO programming skills (such as aggregation, inheritance and polymorphism, working with arrays, etc.) JOGLext enables students to dive into the 3D application development without much previous knowledge of the subject The proposed set of subjects is simple enough, yet it provides them with enough material for creating real 3D applications The subjects also serve as a good foundation for senior, more advance Computer graphics course 28/29 14
15 Thank you! Questions? Suggestions? 29/29 15
Programming of Graphics
Peter Mileff PhD Programming of Graphics Introduction to OpenGL University of Miskolc Department of Information Technology OpenGL libraries GL (Graphics Library): Library of 2D, 3D drawing primitives and
More informationQuestions HW1 Transform Q/A. Transform. Shaoting Zhang. May 11, 2008
May 11, 2008 My office Hour: Mon. 1:00-3:00pm, Hill-418 All of the slides and codes can be found by clicking my name in the course s website 1 2 3 4 Question 1 What s the result? glcolor3f(1.0,0.0,0.0);
More informationTexture Mapping. Mike Bailey.
Texture Mapping 1 Mike Bailey mjb@cs.oregonstate.edu This work is licensed under a Creative Commons Attribution-NonCommercial- NoDerivatives 4.0 International License TextureMapping.pptx The Basic Idea
More informationCOMP3421 Computer Graphics
COMP3421 Computer Graphics Introduction Angela Finlayson Email: angf@cse.unsw.edu.au Computer Graphics Algorithms to automatically render images from models. Light Camera hi mum Objects model image Computer
More informationAn Introduction to 2D OpenGL
An Introduction to 2D OpenGL January 23, 2015 OpenGL predates the common use of object-oriented programming. It is a mode-based system in which state information, modified by various function calls as
More informationAPI for creating a display window and using keyboard/mouse interations. See RayWindow.cpp to see how these are used for Assignment3
OpenGL Introduction Introduction OpenGL OpenGL is an API for computer graphics. Hardware-independent Windowing or getting input is not included in the API Low-level Only knows about triangles (kind of,
More informationCS 591B Lecture 9: The OpenGL Rendering Pipeline
CS 591B Lecture 9: The OpenGL Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination Spring 2007 Rui Wang 3D Polygon Rendering Many applications
More informationOpenGL. Toolkits.
http://www.opengl.org OpenGL Open Graphics Library Graphics API Delivered with UNIX, Win9x/2000/Me/Nt/Xp, Mac OS Direct3D (DirectX) is only Windows Utilizes the window system and event handling of the
More informationComputer Graphics. OpenGL
Computer Graphics OpenGL What is OpenGL? OpenGL (Open Graphics Library) is a library for computer graphics It consists of several procedures and functions that allow a programmer to specify the objects
More informationIntroduction to OpenGL Transformations, Viewing and Lighting. Ali Bigdelou
Introduction to OpenGL Transformations, Viewing and Lighting Ali Bigdelou Modeling From Points to Polygonal Objects Vertices (points) are positioned in the virtual 3D scene Connect points to form polygons
More informationAdding New Features to the CS 5625 Framework. Pramook Khungurn
Adding New Features to the CS 5625 Framework Pramook Khungurn Understanding the CS 5625 framework Features Lazy loading of data loads data only when needed Caching of data no loading same file twice GPU
More informationOpenGL Transformations
OpenGL Transformations R. J. Renka Department of Computer Science & Engineering University of North Texas 02/18/2014 Introduction The most essential aspect of OpenGL is the vertex pipeline described in
More informationCIS 636 Interactive Computer Graphics CIS 736 Computer Graphics Spring 2011
CIS 636 Interactive Computer Graphics CIS 736 Computer Graphics Spring 2011 Lab 1a of 7 OpenGL Setup and Basics Fri 28 Jan 2011 Part 1a (#1 5) due: Thu 03 Feb 2011 (before midnight) The purpose of this
More informationCS4202: Test. 1. Write the letter corresponding to the library name next to the statement or statements that describe library.
CS4202: Test Name: 1. Write the letter corresponding to the library name next to the statement or statements that describe library. (4 points) A. GLUT contains routines that use lower level OpenGL commands
More informationCS293: Java Graphics with JOGL, Solutions
UNIVERSITY OF SURREY c B.Sc. Undergraduate Programmes in Computing B.Sc. Undergraduate Programmes in Mathematical Studies Level HE2 Examination CS293: Java Graphics with JOGL, s Time allowed: 2 hours Spring
More informationExtreme Swing. Romain Guy Sun Microsystems.
Extreme Swing Romain Guy Sun Microsystems Overall Presentation Goal Learn how to create modern user interfaces with Swing Agenda About user interfaces Add a new dimension Swing and Java2D Going further
More informationThis library uses only GL functions but contains code for creating common objects and simplifying viewing.
PES Institute of Technology, Bangalore South Campus (Formerly PES School of Engineering) (Hosur Road, 1KM before Electronic City, Bangalore-560 100) INTERNAL TEST (SCHEME AND SOLUTION) 1 Subject Name:
More informationHow shapes are represented in 3D Graphics. Aims and objectives By the end of the lecture you will be able to describe
Today s lecture Today we will learn about The mathematics of 3D space vectors How shapes are represented in 3D Graphics Modelling shapes as polygons Aims and objectives By the end of the lecture you will
More informationPrecept 2 Aleksey Boyko February 18, 2011
Precept 2 Aleksey Boyko February 18, 2011 Getting started Initialization Drawing Transformations Cameras Animation Input Keyboard Mouse Joystick? Textures Lights Programmable pipeline elements (shaders)
More informationLecture 5b. Transformation
Lecture 5b Transformation Refresher Transformation matrices [4 x 4]: the fourth coordinate is homogenous coordinate. Rotation Transformation: Axis of rotation must through origin (0,0,0). If not, translation
More informationC OMPUTER G RAPHICS Thursday
C OMPUTER G RAPHICS 2017.04.27 Thursday Professor s original PPT http://calab.hanyang.ac.kr/ Courses Computer Graphics practice3.pdf TA s current PPT not uploaded yet GRAPHICS PIPELINE What is Graphics
More informationLecture 4 of 41. Lab 1a: OpenGL Basics
Lab 1a: OpenGL Basics William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://snipurl.com/1y5gc Course web site: http://www.kddresearch.org/courses/cis636 Instructor
More informationAssignment #6 2D Vector Field Visualization Arrow Plot and LIC
Assignment #6 2D Vector Field Visualization Arrow Plot and LIC Due Oct.15th before midnight Goal: In this assignment, you will be asked to implement two visualization techniques for 2D steady (time independent)
More informationCSCI E-74. Simulation and Gaming
CSCI E-74 Virtual and Augmented Reality for Simulation and Gaming Fall term 2017 Gianluca De Novi, PhD Lesson 3 General Introduction to OpenGL APIs and TRS Perspective Simulation Perspective simulation
More informationRECITATION - 1. Ceng477 Fall
RECITATION - 1 Ceng477 Fall 2007-2008 2/ 53 Agenda General rules for the course General info on the libraries GLUT OpenGL GLUI Details about GLUT Functions Probably we will not cover this part 3/ 53 General
More informationTransformation Pipeline
Transformation Pipeline Local (Object) Space Modeling World Space Clip Space Projection Eye Space Viewing Perspective divide NDC space Normalized l d Device Coordinatesd Viewport mapping Screen space Coordinate
More informationGraphics Programming
Graphics Programming 3 rd Week, 2011 OpenGL API (1) API (application programming interface) Interface between an application program and a graphics system Application Program OpenGL API Graphics Library
More informationPerformance OpenGL Programming (for whatever reason)
Performance OpenGL Programming (for whatever reason) Mike Bailey Oregon State University Performance Bottlenecks In general there are four places a graphics system can become bottlenecked: 1. The computer
More informationSHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming
SHADER PROGRAMMING Based on Jian Huang s lecture on Shader Programming What OpenGL 15 years ago could do http://www.neilturner.me.uk/shots/opengl-big.jpg What OpenGL can do now What s Changed? 15 years
More informationGATAV 9. Goodby flatland Welcome to 3D!
GATAV 9. Goodby flatland Welcome to 3D! TOC 1. OpenGL ES the 3D-API 2. The buffer concept - a technical necessity 3. Introducing GLSurfaceView the 3D-View 4. GLSurfaceView.Renderer the interface to 3D-content
More informationFoundations of 3D Graphics Programming
Foundations of 3D Graphics Programming Jim X. Chen Edward J. Wegman Foundations of 3D Graphics Programming Using JOGL and Java3D With 139 Figures Jim X. Chen, PhD Computer Science Department George Mason
More informationHomework #2 and #3 Due Friday, October 12 th and Friday, October 19 th
Homework #2 and #3 Due Friday, October 12 th and Friday, October 19 th 1. a. Show that the following sequences commute: i. A rotation and a uniform scaling ii. Two rotations about the same axis iii. Two
More informationComputer Graphics (Basic OpenGL)
Computer Graphics (Basic OpenGL) Thilo Kielmann Fall 2008 Vrije Universiteit, Amsterdam kielmann@cs.vu.nl http://www.cs.vu.nl/ graphics/ Computer Graphics (Basic OpenGL, Input and Interaction), ((57))
More informationThe Rendering Pipeline (1)
The Rendering Pipeline (1) Alessandro Martinelli alessandro.martinelli@unipv.it 30 settembre 2014 The Rendering Pipeline (1) Rendering Architecture First Rendering Pipeline Second Pipeline: Illumination
More informationComputer Graphics. Chapter 7 2D Geometric Transformations
Computer Graphics Chapter 7 2D Geometric Transformations Chapter 7 Two-Dimensional Geometric Transformations Part III. OpenGL Functions for Two-Dimensional Geometric Transformations OpenGL Geometric Transformation
More informationOpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL
OpenGL: Open Graphics Library Introduction to OpenGL Part II CS 351-50 Graphics API ( Application Programming Interface) Software library Layer between programmer and graphics hardware (and other software
More informationCSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science
CSC 307 1.0 Graphics Programming Department of Statistics and Computer Science Graphics Programming OpenGL 3D Drawing 2 3D Graphics Projections Getting 3D to 2D 3D scene 2D image 3 Projections Orthographic
More informationINF555. Fundamentals of 3D. Lecture 4: Debriefing: ICP (kd-trees) Homography Graphics pipeline. Frank Nielsen
INF555 Fundamentals of 3D Lecture 4: Debriefing: ICP (kd-trees) Homography Graphics pipeline Frank Nielsen nielsen@lix.polytechnique.fr ICP: Algorithm at a glance Start from a not too far initial transformation
More informationCS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1
CS 428: Fall 2010 Introduction to Computer Graphics OpenGL primer Andrew Nealen, Rutgers, 2010 9/13/2010 1 Graphics hardware Programmable {vertex, geometry, pixel} shaders Powerful GeForce 285 GTX GeForce480
More information1 Preview. Dr. Scott Gordon Computer Science Dept. CSUS. Virtual Cameras, Viewing Transformations: CSc-155 Advanced Computer Graphics
CSc-155 Advanced Computer Graphics 1 Preview Dr. Scott Gordon Computer Science Dept. CSUS Course Description Modeling, viewing, and rendering techniques in 3D computer graphics systems. Topics include:
More informationHierarchical Modeling: Tree of Transformations, Display Lists and Functions, Matrix and Attribute Stacks,
Hierarchical Modeling: Tree of Transformations, Display Lists and Functions, Matrix and Attribute Stacks, Hierarchical Modeling Hofstra University 1 Modeling complex objects/motion Decompose object hierarchically
More informationModeling with Transformations
Modeling with Transformations Prerequisites This module requires some understanding of 3D geometry, particularly a sense of how objects can be moved around in 3-space. The student should also have some
More informationComputer Graphics Programming
Computer Graphics Programming Graphics APIs Using MFC (Microsoft Foundation Class) in Visual C++ Programming in Visual C++ GLUT in Windows and Unix platform Overview and Application Graphics APIs Provide
More informationFundamentals of 3D. Lecture 4: Debriefing: ICP (kd-trees) Homography Graphics pipeline. Frank Nielsen 5 octobre 2011
INF555 Fundamentals of 3D Lecture 4: Debriefing: ICP (kd-trees) Homography Graphics pipeline Frank Nielsen 5 octobre 2011 nielsen@lix.polytechnique.fr ICP: Iterative Closest Point Algorithm at a glance
More informationScene Graphs. CS4620/5620: Lecture 7. Announcements. HW 1 out. PA 1 will be out on Wed
CS4620/5620: Lecture 7 Scene Graphs 1 Announcements HW 1 out PA 1 will be out on Wed Next week practicum will have an office hour type session on Open GL 2 Example Can represent drawing with flat list
More informationDue: Thursday, April 28 th by the stroke of midnight! TA: Jeff Booth
Due: Thursday, April 28 th by the stroke of midnight! TA: Jeff Booth Checking out, building, and using the sample solution Part 1: Rendering a Sphere Part 2: Hierarchical Modeling Part 3: glulookat() Part
More informationGraphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실.
Graphics Texture Mapping 고려대학교컴퓨터그래픽스연구실 3D Rendering Pipeline 3D Primitives 3D Modeling Coordinates Model Transformation 3D World Coordinates Lighting 3D World Coordinates Viewing Transformation 3D Viewing
More informationAssignment #5: Scalar Field Visualization 3D: Direct Volume Rendering
Assignment #5: Scalar Field Visualization 3D: Direct Volume Rendering Goals: Due October 4 th, before midnight This is the continuation of Assignment 4. The goal is to implement a simple DVR -- 2D texture-based
More informationTo Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)
Computer Graphics (Fall 2008) COMS 4160, Lecture 9: OpenGL 1 http://www.cs.columbia.edu/~cs4160 To Do Start thinking (now) about HW 3. Milestones are due soon. Course Course 3D Graphics Pipeline 3D Graphics
More informationModeling Objects by Polygonal Approximations. Linear and Affine Transformations (Maps)
Modeling Objects by Polygonal Approximations Define volumetric objects in terms of surfaces patches that surround the volume Each surface patch is approximated set of polygons Each polygon is specified
More informationIntroduction to OpenGL
Introduction to OpenGL Banafsheh Azari http://www.uni-weimar.de/cms/medien/cg.html What You ll See Today What is OpenGL? Related Libraries OpenGL Command Syntax B. Azari http://www.uni-weimar.de/cms/medien/cg.html
More informationGraphics Pipeline & APIs
Graphics Pipeline & APIs CPU Vertex Processing Rasterization Fragment Processing glclear (GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT); glpushmatrix (); gltranslatef (-0.15, -0.15, solidz); glmaterialfv(gl_front,
More information3D Graphics Pipeline II Clipping. Instructor Stephen J. Guy
3D Graphics Pipeline II Clipping Instructor Stephen J. Guy 3D Rendering Pipeline (for direct illumination) 3D Geometric Primitives 3D Model Primitives Modeling Transformation 3D World Coordinates Lighting
More informationTextures. Texture Mapping. Bitmap Textures. Basic Texture Techniques
Texture Mapping Textures The realism of an image is greatly enhanced by adding surface textures to the various faces of a mesh object. In part a) images have been pasted onto each face of a box. Part b)
More informationRendering. Part 1 An introduction to OpenGL
Rendering Part 1 An introduction to OpenGL Olivier Gourmel VORTEX Team IRIT University of Toulouse gourmel@irit.fr Image synthesis The Graphics Processing Unit (GPU): A highly parallel architecture specialized
More informationCMSC427 Transformations II: Viewing. Credit: some slides from Dr. Zwicker
CMSC427 Transformations II: Viewing Credit: some slides from Dr. Zwicker What next? GIVEN THE TOOLS OF The standard rigid and affine transformations Their representation with matrices and homogeneous coordinates
More informationHierarchical Modeling
Hierarchical Modeling Geometric Primitives Remember that most graphics APIs have only a few geometric primitives Spheres, cubes, triangles, etc These primitives are instanced in order to apply transforms
More informationIntroduction to OpenGL. CS 4620 Balazs Kovacs, 2014 Daniel Schroeder, 2013 Pramook Khungurn, 2012
Introduction to OpenGL CS 4620 Balazs Kovacs, 2014 Daniel Schroeder, 2013 Pramook Khungurn, 2012 Introduction Show how to produce graphics using OpenGL Introduce our framework for OpenGL programming OpenGL
More informationOpenGL: Setup 3D World
CT4510: Computer Graphics OpenGL: Setup 3D World BOCHANG MOON Prerequisite for 3D World Understanding on basic mathematical background, transformations, and spaces Pixels, raster image, ector, matrix,
More informationTeaching a Modern Graphics Pipeline Using a Shader-based Software Renderer
Teaching a Modern Graphics Pipeline Using a Shader-based Software Renderer Heinrich Fink 1 Thomas Weber 1 Michael Wimmer 1 1 Institute of Computer Graphics and Algorithms, Vienna University of Technology
More informationUsing GLU/GLUT Objects
Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutwirecone glutwirecube glucylinder glutwireteapot GLU/GLUT Objects Each glu/glut object has its default size, position, and orientation
More informationOpen GL Framework For A Computer Graphics Course
Open GL Framework For A Computer Graphics Course Programmer: Daniel Odle Sponsor / Advisor: Dr. Morse University of Evansville 4-26-03 Table of Contents Introduction 3 Statement of Problem 3 Design Approach
More informationLecture 22 Sections 8.8, 8.9, Wed, Oct 28, 2009
s The s Lecture 22 Sections 8.8, 8.9, 8.10 Hampden-Sydney College Wed, Oct 28, 2009 Outline s The 1 2 3 4 5 The 6 7 8 Outline s The 1 2 3 4 5 The 6 7 8 Creating Images s The To create a texture image internally,
More informationcs123 Lab 3 OpenGL Part One 1 Introduction 2 OpenGL Basics 2.2 The Rendering Pipeline 2.1 The CPU and the GPU 2.3 Basic Syntax of OpenGL commands
cs123 Lab 3 OpenGL Part One Introduction to Computer Graphics 1 Introduction From now on, our weekly labs will focus on the use of OpenGL. While the lectures and projects will let you get a deeper understanding
More informationJOGL 3D GRAPHICS. Drawing a 3D line. In this chapter, let us see how to deal with 3D graphics.
http://www.tutorialspoint.com/jogl/jogl_3d_graphics.htm JOGL 3D GRAPHICS Copyright tutorialspoint.com In this chapter, let us see how to deal with 3D graphics. Drawing a 3D line Let us draw a simple line
More informationGL_MODELVIEW transformation
lecture 3 view transformations model transformations GL_MODELVIEW transformation view transformations: How do we map from world coordinates to camera/view/eye coordinates? model transformations: How do
More informationGraphics Programming. August 31, Programming of the Sierpinski gasket. Programming with OpenGL and C/C++
Computer Graphics Graphics Programming August 31, 2005 Contents Our Goal in This Chapter Programming of the Sierpinski gasket How To? Programming with OpenGL and C/C++ OpenGL API (Application Programmer
More informationSurface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:
Surface Graphics Objects are explicitely defined by a surface or boundary representation (explicit inside vs outside) This boundary representation can be given by: - a mesh of polygons: 200 polys 1,000
More informationCSE Intro to Computer Graphics. ANSWER KEY: Midterm Examination. November 18, Instructor: Sam Buss, UC San Diego
CSE 167 - Intro to Computer Graphics ANSWER KEY: Midterm Examination November 18, 2003 Instructor: Sam Buss, UC San Diego Write your name or initials on every page before beginning the exam. You have 75
More informationLecture 07: Buffers and Textures
Lecture 07: Buffers and Textures CSE 40166 Computer Graphics Peter Bui University of Notre Dame, IN, USA October 26, 2010 OpenGL Pipeline Today s Focus Pixel Buffers: read and write image data to and from
More informationIntroduction to Computer Graphics with OpenGL/GLUT
Introduction to Computer Graphics with OpenGL/GLUT What is OpenGL? A software interface to graphics hardware Graphics rendering API (Low Level) High-quality color images composed of geometric and image
More information6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm
6.837 Introduction to Computer Graphics Assignment 5: OpenGL and Solid Textures Due Wednesday October 22, 2003 at 11:59pm In this assignment, you will add an interactive preview of the scene and solid
More informationToday s Agenda. Basic design of a graphics system. Introduction to OpenGL
Today s Agenda Basic design of a graphics system Introduction to OpenGL Image Compositing Compositing one image over another is most common choice can think of each image drawn on a transparent plastic
More informationLuiz Fernando Martha André Pereira
Computer Graphics for Engineering Numerical simulation in technical sciences Color / OpenGL Luiz Fernando Martha André Pereira Graz, Austria June 2014 To Remember Computer Graphics Data Processing Data
More informationOpenGL Tutorial. Ceng 477 Introduction to Computer Graphics
OpenGL Tutorial Ceng 477 Introduction to Computer Graphics Adapted from: http://www.cs.princeton.edu/courses/archive/spr06/cos426/assn3/opengl_tutorial.ppt OpenGL IS an API OpenGL IS nothing more than
More informationComputer graphics MN1
Computer graphics MN1 Hierarchical modeling Transformations in OpenGL glmatrixmode(gl_modelview); glloadidentity(); // identity matrix gltranslatef(4.0, 5.0, 6.0); glrotatef(45.0, 1.0, 2.0, 3.0); gltranslatef(-4.0,
More informationRendering Pipeline/ OpenGL
Chapter 2 Basics of Computer Graphics: Your tasks for the weekend Piazza Discussion Group: Register Post review questions by Mon noon Use private option, rev1 tag Start Assignment 1 Test programming environment
More informationGraphics Pipeline & APIs
3 2 4 Graphics Pipeline & APIs CPU Vertex Processing Rasterization Processing glclear (GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT); glpushmatrix (); gltranslatef (-0.15, -0.15, solidz); glmaterialfv(gl_front,
More informationCS418 OpenGL & GLUT Programming Tutorial (I) Presented by : Wei-Wen Feng 1/30/2008
CS418 OpenGL & GLUT Programming Tutorial (I) Presented by : Wei-Wen Feng 1/30/2008 2008/2/3 Slide 2 I Am Your TA Name : Wei-Wen Wen Feng 4th Year Graduate Student in Graphics I will be Holding discussion/tutorial
More informationModeling. Simulating the Everyday World
Modeling Simulating the Everyday World Three broad areas: Modeling (Geometric) = Shape Animation = Motion/Behavior Rendering = Appearance Page 1 Geometric Modeling 1. How to represent 3d shapes Polygonal
More informationDH2323 DGI16 Lab2 Transformations
DH2323 DGI16 Lab2 Transformations In Lab1, you used SDL (Simple DirectMedia Layer) which is a cross-platform development library designed to provide low level access to audio and input devices. This lab
More informationChapter 3 - Basic Mathematics for 3D Computer Graphics
Chapter 3 - Basic Mathematics for 3D Computer Graphics Three-Dimensional Geometric Transformations Affine Transformations and Homogeneous Coordinates OpenGL Matrix Logic Translation Add a vector t Geometrical
More information// double buffering and RGB glutinitdisplaymode(glut_double GLUT_RGBA); // your own initializations
#include int main(int argc, char** argv) { glutinit(&argc, argv); Typical OpenGL/GLUT Main Program // GLUT, GLU, and OpenGL defs // program arguments // initialize glut and gl // double buffering
More informationCSC 8470 Computer Graphics. What is Computer Graphics?
CSC 8470 Computer Graphics What is Computer Graphics? For us, it is primarily the study of how pictures can be generated using a computer. But it also includes: software tools used to make pictures hardware
More informationAdvanced Computer Graphics (CS & SE )
Advanced Computer Graphics (CS & SE 233.420) Topics Covered Picking Pipeline Viewing and Transformations Rendering Modes OpenGL can render in one of three modes selected by glrendermode(mode) GL_RENDER
More informationInteractive OpenGL Animation
Syracuse University SURFACE Syracuse University Honors Program Capstone Projects Syracuse University Honors Program Capstone Projects Spring 5-1-2011 Interactive OpenGL Animation Lusha Zhang Follow this
More informationOUTLINE. Hierarchical Models Z-Fighting Primitives Besides Triangles Back Face Culling
MATRIX STACKS OUTLINE Hierarchical Models Z-Fighting Primitives Besides Triangles Back Face Culling HIERARCHICAL MODELS Building scenes where objects move in relation to each other rather than independently
More informationTeacher Assistant : Tamir Grossinger Reception hours: by - Building 37 / office -102 Assignments: 4 programing using
Teacher Assistant : Tamir Grossinger email: tamirgr@gmail.com Reception hours: by email - Building 37 / office -102 Assignments: 4 programing using C++ 1 theoretical You can find everything you need in
More informationCMSC427 Final Practice v2 Fall 2017
CMSC427 Final Practice v2 Fall 2017 This is to represent the flow of the final and give you an idea of relative weighting. No promises that knowing this will predict how you ll do on the final. Some questions
More informationIntMu.Lab5. Download all the files available from
IntMu.Lab5 0. Download all the files available from http://www.dee.isep.ipp.pt/~jml/intmu/lab5: wget http://www.dee.isep.ipp.pt/~jml/intmu/lab5/makefile make getall Analyze the program windmill.c. Compile
More informationA display list is a group of OpenGL commands that have been stored for later execution.
Introduction A display list is a group of OpenGL commands that have been stored for later execution. Most OpenGL commands can be either stored in a display list or issued in immediate mode. 1 For example,
More informationS U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T
S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render
More informationCSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012
CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Project 2 due Friday, October 12
More informationCS559: Computer Graphics. Lecture 12: OpenGL Transformation Li Zhang Spring 2008
CS559: Computer Graphics Lecture 2: OpenGL Transformation Li Zhang Spring 28 Today Transformation in OpenGL Reading Chapter 3 Last time Primitive Details glpolygonmode(glenum face, GLenum mode); face:
More informationWindow To A Different World Wednesday, 28 October :13 - Last Updated Wednesday, 28 October :20
You probably have heard about Jhonny Chung Lee ( http://johnnylee.net/projects/wii/ ), the man who connected a wiimote to his computer to use it as a "touch" Device for a beamer projected. An other project
More informationVisualizing Molecular Dynamics
Visualizing Molecular Dynamics Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials
More informationLectures OpenGL Introduction
Lectures OpenGL Introduction By Tom Duff Pixar Animation Studios Emeryville, California and George Ledin Jr Sonoma State University Rohnert Park, California 2004, Tom Duff and George Ledin Jr 1 What is
More informationGraphics Hardware and OpenGL
Graphics Hardware and OpenGL Ubi Soft, Prince of Persia: The Sands of Time What does graphics hardware have to do fast? Camera Views Different views of an object in the world 1 Camera Views Lines from
More informationCSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science
CSC 307 1.0 Graphics Programming Department of Statistics and Computer Science Graphics Programming 2 Common Uses for Computer Graphics Applications for real-time 3D graphics range from interactive games
More informationComputer Graphics. Chapter 10 Three-Dimensional Viewing
Computer Graphics Chapter 10 Three-Dimensional Viewing Chapter 10 Three-Dimensional Viewing Part I. Overview of 3D Viewing Concept 3D Viewing Pipeline vs. OpenGL Pipeline 3D Viewing-Coordinate Parameters
More information