Robot Arm //Função callback de redesenho da janela de visualização void Display(void) { glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glTranslatef(-1.0,

Slides:



Advertisements
Similar presentations
Computer Graphics - Transformation -
Advertisements

Computer Graphics - Graphics Programming -
1 Gestione degli eventi Daniele Marini. 2 Pipe-line di OGL pixel data vertex data display list pixel operation evaluator rasterization per vertex op &
OpenGL Course Notes Chapter 3: Viewing Jim Mims, Spring 2009.
Gestione degli eventi Daniele Marini Davide Gadia Marco Ronchetti Davide Selmo Corso Di Programmazione Grafica aa2005/2006.
Coordinate System.
Figures based on regular polygons (lab3)
Computer Graphics 2D & 3D Transformation.
OPENGL.
3D Game Programming Geometric Transformations
Using GLU/GLUT Objects GLU/GLUT provides very simple object primitives glutWireCube glutWireCone gluCylinder glutWireTeapot.
CLASS 4 CS770/870. Translation Scale Multiplying Matrices. The R C rule What happens when we do two translates? What happens when we do two scales?
1 Buffers and Processing Fragments 2011 Autumn Animação e Visualização Tridimensional 2011/2012.
#include int line_width = 1; void Display( void ) { glEnable( GL_LINE_STIPPLE ); glClearColor (0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT);
Chapter 3. Drawing primitives in Space Presented by Garrett Yeh.
When click!! (void) glRenderMode (GL_SELECT); glInitNames(); glPushName(0); glMatrixMode (GL_PROJECTION); glPushMatrix (); glLoadIdentity (); gluPickMatrix.
6/15/2015©Zachary Wartell 1 OpenGL Transforms with Object-Oriented Framework Revision 1.1 Copyright Zachary Wartell, University of North Carolina at Charlotte,
Computer Graphics (Fall 2003) COMS 4160, Lecture 6: OpenGL 2 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 OpenGL Transformations Ed Angel Professor of Computer Science, Electrical and Computer.
Computer Graphics (Fall 2004) COMS 4160, Lecture 11: OpenGL 2
Introduction to OpenGL M. Ramanathan STTP CAD 2011Introduction to OpenGL.
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.
CAP4730: Computational Structures in Computer Graphics Introduction to OpenGL.
FunWorlds the story continues.. Fp group, 04/07/2002 work-in-progress overview Claus Reinke.
Computer Graphics, KKU. Lecture 131 Transformation and Viewing in OpenGL.
OpenGL Matrices and Transformations Angel, Chapter 3 slides from AW, Red Book, etc. CSCI 6360.
TWO DIMENSIONAL GEOMETRIC TRANSFORMATIONS CA 302 Computer Graphics and Visual Programming Aydın Öztürk
The Viewing Pipeline (Chapter 4) 5/26/ Overview OpenGL viewing pipeline: OpenGL viewing pipeline: – Modelview matrix – Projection matrix Parallel.
CSE 470: Computer Graphics. 10/15/ Defining a Vertex A 2D vertex: glVertex2f(GLfloat x, GLfloat y); 2D vertexfloating pointopenGL parameter type.
Introduction to OpenGL 1. 2 OpenGL A Graphics rendering API introduced in 1992 by Silicon Graphics Inc Provide the low-level functions to access graphics.
Hierarchical Modeling CS418 Computer Graphics John C. Hart.
Modeling with OpenGL Practice with OpenGL transformations.
Computing & Information Sciences Kansas State University CIS 536/636 Introduction to Computer Graphics Lecture 4 of 41 William H. Hsu Department of Computing.
OpenGL: Modeling void DrawPyramid(){ glBegin(GL_TRIANGLES); glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.1, 0.0, 0.0); glVertex3f(0.0,
Transformations Tutorial
Computer Graphics I, Fall 2010 OpenGL Transformations.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 OpenGL Transformations.
Viewing and Transformation. Pixel pipeline Vertex pipeline Course Map Transformation & Lighting Primitive assembly Viewport culling & clipping Texture.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
CGGM Lab. Tan-Chi Ho 2001 Viewing and Transformation.
Computing & Information Sciences Kansas State University CG Basics 3 of 8: OpenGL Primer 1 CIS 636/736: (Introduction to) Computer Graphics CIS 636 Introduction.
Introduction to OpenGL & HW1 Announcement 劉軒銘, 網媒所 碩二 ICG 2012 Fall.
Viewing Korea Univ. Computer Graphics Lab. Hong, Jin Kyung.
Chap 3 Viewing and Transformation
1 OpenGL Transformations. 2 Objectives Learn how to carry out transformations in OpenGL ­Rotation ­Translation ­Scaling Introduce OpenGL matrix modes.
CS559: Computer Graphics Lecture 12: OpenGL - Transformation Li Zhang Spring 2008.
CS559: Computer Graphics Lecture 12: OpenGL: ModelView Li Zhang Spring 2010.
CS559: Computer Graphics Lecture 13: Hierarchical Modeling and Curves Li Zhang Spring 2010.
1 Geometric Transformations-II Modelling Transforms By Dr.Ureerat Suksawatchon.
Implement of transformation,projection, viewing Hanyang University Jungsik Park.
CS380 LAB II OpenGL Donghyuk Kim Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
The Modelview Stack Lecture 9 Wed, Sep 12, The Modelview Stack OpenGL maintains a stack of matrices. The matrix on top of the stack is the current.
Computer Graphics Lecture 34. OpenGL Programming II Taqdees A. Siddiqi
OpenGL Matrices and Transformations Angel, Chapter 3 slides from AW, Red Book, etc. CSCI 6360/4360.
CSC Graphics Programming
Advanced Graphics Algorithms Ying Zhu Georgia State University
Transformations Introduction to Computer Graphics and Animation
Reference1. [OpenGL course slides by Rasmus Stenholt]
Advanced Graphics Algorithms Ying Zhu Georgia State University
Geometric Transformations
Unit-5 Geometric Objects and Transformations-II
Lecture 08 and 09 View & Projection
Computer Graphics, KKU. Lecture 13
Chapter 4/5 glMatrixMode Modeling Transformations glTranslate glScale
Geometric Transformations
Lecture 6 and 7 Transformations
OPENGL.
The Modelview Matrix Lecture 8 Mon, Sep 10, 2007.
Advanced Graphics Algorithms Ying Zhu Georgia State University
Geometric Transformations
Presentation transcript:

Robot Arm //Função callback de redesenho da janela de visualização void Display(void) { glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glTranslatef(-1.0, 0.0, 0.0); glRotatef((GLfloat) ombro, 0.0, 1.0, 0.0); glTranslatef(1.0, 0.0, 0.0); glPushMatrix(); glScalef(2.0, 0.4, 1.0); glutWireCube(1.0); glPopMatrix(); …… continua no próximo slide …

Robot Arma (continuação da Display) … glTranslatef(1.0, 0.0, 0.0); glRotatef((GLfloat) cotovelo, 0.0, 0.0, 1.0); glTranslatef(1.0, 0.0, 0.0); glPushMatrix(); glScalef(2.0, 0.4, 1.0); glutWireCube(1.0); glPopMatrix(); glPopMatrix(); glutSwapBuffers(); }

Robot Arm void Reshape(GLsizei w, GLsizei h) { // Especifica as dimensões da viewport glViewport(0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode(GL_PROJECTION); gluPerspective(65.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0, 0.0, -5.0); }