CSC 240 Computer Graphics. Fall 2015 Smith College

Similar documents
Lecture 22 Sections 8.8, 8.9, Wed, Oct 28, 2009

IntMu.Lab5. Download all the files available from

FAKULTI TEKNOLOGI MAKLUMAT DAN KOMUNIKASI BITM INTERACTIVE COMPUTER GRAPHICS LAB SESSION 4. C++ - OpenGL

Assignment #6 2D Vector Field Visualization Arrow Plot and LIC

+ = Texturing: Glue n-dimensional images onto geometrical objects. Texturing. Texture magnification. Texture coordinates. Bilinear interpolation

Yazhuo Liu Homework 3

Graphics. Texture Mapping 고려대학교컴퓨터그래픽스연구실.

1 /* 4 C:\opencv\build\include. 6 C:\opencv\build\x86\vc10\lib

CSCI E-74. Simulation and Gaming

Shading. Flat shading Gouraud shading Phong shading

Grafica Computazionale

Computer graphics MN1

Textures. Datorgrafik 2006

Chapter 9 Texture Mapping An Overview and an Example Steps in Texture Mapping A Sample Program Specifying the Texture Texture Proxy Replacing All or

Module Contact: Dr R J Lapeer, CMP Copyright of the University of East Anglia Version 1

Exercise Max. Points Total 90

Texture and other Mappings

Computational Strategies

Information Coding / Computer Graphics, ISY, LiTH GLSL. OpenGL Shading Language. Language with syntax similar to C

Texture Mapping Part 1

OpenGL: Setup 3D World

Graphics Programming

Shading/Texturing. Dr. Scott Schaefer

OpenGL Basics I. Seoul National University Graphics & Media Lab

3D Graphics and OpenGl. First Steps

Department of Computer Sciences Graphics Spring 2013 (Lecture 19) Bump Maps

CSE4030 Introduction to Computer Graphics

Introduction to OpenGL

Programming with OpenGL Part 2: Complete Programs Computer Graphics I, Fall

GRAFIKA KOMPUTER. ~ M. Ali Fauzi

CS 428: Fall Introduction to. Transformations in OpenGL + hierarchical modeling. Andrew Nealen, Rutgers, /21/2009 1

Intro to OpenGL III. Don Fussell Computer Science Department The University of Texas at Austin

Methodology for Lecture. Importance of Lighting. Outline. Shading Models. Brief primer on Color. Foundations of Computer Graphics (Spring 2010)

Precept 2 Aleksey Boyko February 18, 2011

Name: SID: LAB Section: Lab 6 - Part 1: Pixels and Triangle Rasterization

COMPSCI 373 S1 C - Assignment 2 Sample Solution

5.2 Shading in OpenGL

CT5510: Computer Graphics. Texture Mapping

Surface Graphics. 200 polys 1,000 polys 15,000 polys. an empty foot. - a mesh of spline patches:

Lecture 07: Buffers and Textures

Texture Mapping. Texture Mapping. Map textures to surfaces. Trompe L Oeil ( Deceive the Eye ) The texture. Texture map

Textures. Texture Mapping. Bitmap Textures. Basic Texture Techniques

CS 559 Computer Graphics Midterm Exam March 22, :30-3:45 pm

To Do. Computer Graphics (Fall 2008) Course Outline. Course Outline. Methodology for Lecture. Demo: Surreal (HW 3)

Basic Graphics Programming

Computer graphics MN1

Mar :51 gltexobj.cpp

Ulf Assarsson Department of Computer Engineering Chalmers University of Technology

Lectures OpenGL Introduction

Announcements OpenGL. Computer Graphics. Autumn 2009 CS4815

Texture Mapping and Sampling

Hierarchical Modeling: Tree of Transformations, Display Lists and Functions, Matrix and Attribute Stacks,

Shading in OpenGL. Outline. Defining and Maintaining Normals. Normalization. Enabling Lighting and Lights. Outline

A display list is a group of OpenGL commands that have been stored for later execution.

OpenGL Tutorial. Ceng 477 Introduction to Computer Graphics

Teacher Assistant : Tamir Grossinger Reception hours: by - Building 37 / office -102 Assignments: 4 programing using

Lecture 5b. Transformation

CSE 167: Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

OpenGL & Visualization

Programming Graphics Hardware

Incorporating Video in Platform-Independent Video Games Using Open-Source Software

SHADER PROGRAMMING. Based on Jian Huang s lecture on Shader Programming

An Introduction to 3D Computer Graphics, Stereoscopic Image, and Animation in OpenGL and C/C++ Fore June

Models and Architectures

9.Texture Mapping. Chapter 9. Chapter Objectives

Draw the basic Geometry Objects. Hanyang University

CSC Graphics Programming. Budditha Hettige Department of Statistics and Computer Science

... Print PROGRAMS\Final Project final\planes\planeshoot.c 1

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

CMSC 425: Lecture 12 Texture Mapping Thursday, Mar 14, 2013

Announcements OpenGL. Computer Graphics. Spring CS4815

Shading Triangles. Lecture 37. Robb T. Koether. Hampden-Sydney College. Mon, Nov 30, 2015

Computer graphics Labs: OpenGL (1/3) Geometric transformations and projections

Lecture 2 CISC440/640 Spring Department of Computer and Information Science

CS179: GPU Programming

OpenGL. 1 OpenGL OpenGL 1.2 3D. (euske) 1. Client-Server Model OpenGL

Illumination and Reflection in OpenGL CS 460/560. Computer Graphics. Shadows. Photo-Realism: Ray Tracing. Binghamton University.

Computer Graphics Coursework 1

Lecture 5 3D graphics part 3

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

// double buffering and RGB glutinitdisplaymode(glut_double GLUT_RGBA); // your own initializations

Illumination and Shading

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

Texture Mapping. Mike Bailey.

CS Computer Graphics: Hidden Surface Removal

Computer graphic -- Programming with OpenGL I

CS418 OpenGL & GLUT Programming Tutorial (I) Presented by : Wei-Wen Feng 1/30/2008

Parametric description

Computer Graphics

Topics and things to know about them:

GPU Programming EE Practice Midterm Examination

Programming using OpenGL: A first Introduction

6. Make use of glviewport() to display two sine curves on the same screen, one on the

1) Here is the various stages of the tetrahedron:

OpenGL/GLUT Intro. Week 1, Fri Jan 12

CSC 418/2504 Computer Graphics, Winter 2012 Assignment 1 (10% of course grade)


Computer graphics MN1

API for creating a display window and using keyboard/mouse interations. See RayWindow.cpp to see how these are used for Assignment3

Transcription:

CSC 240 Computer Graphics Fall 2015 Smith College

Outline: 11/9 Stacks revisited Shading (using normal vectors) Texture Mapping Final quiz If time: robot with two arms White background slides from Eitan Mendelowitz

Current Matrix

Add a transformation: matrix multiplication (right) Current Matrix x

Replace current matrix with result Current Matrix

PUSH: Add current matrix to the matrix stack Current Matrix

Add another transformation: matrix multiplication (right) Current Matrix x

Replace current matrix with result Current Matrix

PUSH: Add current matrix to the matrix stack Current Matrix

Add another transformation: matrix multiplication (right) Current Matrix x

Replace current matrix with result Current Matrix

POP: Completely get rid of current matrix and pop from the top of the stack Current Matrix

Back to where we were before Current Matrix

Add another transformation: matrix multiplication (right) Current Matrix x

Replace current matrix with result Current Matrix

POP: Completely get rid of current matrix and pop from the top of the stack Current Matrix

Back to the beginning Current Matrix

Shading in OpenGL

Lighting is determined by the surface s angle to the light source

Lighting is determined by the surface s angle to the light source (as defined by the surface normal) Surface Normal

Lighting is determined by the surface s angle to the light source (as defined by the surface normal) Surface Normal

Lighting is determined by the surface s angle to the light source (as defined by the surface normal) Surface Normal

Lighting is determined by the surface s angle to the light source (as defined by the surface normal) Surface Normal

Lighting is determined by the surface s angle to the light source (as defined by the surface normal) Surface Normal

Suppose Poly based Normals

Vertex based Normals

Interpolated Surface Normals glshademodel(gl_smooth)

glshademodel(gl_flat) glshademodel(gl_smooth)

Begin: Texture Mapping (next time: texture mapping lab)

Texture Mapping! is how far along AB you are. " is how far along AC you are.!, " are [0,1] " c a! b

Texture Mapping 0,1 v c 0,0 1,0 u " Texture Coordinates a! b

Texture Mapping 0,1 v c 0,0 1,0 u " Texture Coordinates a! b

Texture Mapping 0,1 v c 0,0 1,0 u " Texture Coordinates a! b

Exercise: what image does this code produce? void display(void) { glclear(gl_color_buffer_bit GL_DEPTH_BUFFER_BIT); glenable(gl_texture_2d); gltexenvf(gl_texture_env, GL_TEXTURE_ENV_MODE, GL_DECAL); glbindtexture(gl_texture_2d, texname); glbegin(gl_quads); gltexcoord2f(0.0, 0.0); glvertex3f(-2.0, -1.0, 0.0); gltexcoord2f(0.0, 1.0); glvertex3f(-2.0, 1.0, 0.0); gltexcoord2f(1.0, 1.0); glvertex3f(0.0, 1.0, 0.0); gltexcoord2f(1.0, 0.0); glvertex3f(0.0, -1.0, 0.0); gltexcoord2f(0.0, 0.0); glvertex3f(1.0, -1.0, 0.0); gltexcoord2f(0.0, 1.0); glvertex3f(1.0, 1.0, 0.0); gltexcoord2f(1.0, 1.0); glvertex3f(2.41421, 1.0, -1.41421); gltexcoord2f(1.0, 0.0); glvertex3f(2.41421, -1.0, -1.41421); glend(); } glflush(); gldisable(gl_texture_2d);

Image Produced OpenGL Redbook, Chapter 9, Figure 9-2

Bump Mapping "Bump-map-demo-full https://commons.wikimedia.org/

Final quiz In-class on Monday 12/14 One study sheet (hand-written, front and back) Focus on the theoretical aspects of the second half of the semester Reasons: Quiz earlier so there is time for final project Self-scheduled exam period is very late Helps you study in a focused manner