Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 2.

Slides:



Advertisements
Similar presentations
OpenGL: Simple Use Open a window and attach OpenGL to it Set projection parameters (e.g., field of view) Setup lighting, if any Main rendering loop –Set.
Advertisements

MAT 594CM S2010Fundamentals of Spatial ComputingAngus Forbes Overview Goals of the course: 1. to introduce real-time 3D graphics programming with openGL.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
CS 4363/6353 INTRODUCTION TO COMPUTER GRAPHICS. WHAT YOU’LL SEE Interactive 3D computer graphics Real-time 2D, but mostly 3D OpenGL C/C++ (if you don’t.
PYRAMIDS.
Computer Graphics - Class 14
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Programming with OpenGL Part 2: Complete Programs Ed Angel Professor of Computer Science,
Gopi -ICS186AW03 - Slide1 Graphics Pipeline: First Pass.
Game Engine Design ITCS 4010/5010 Spring 2006 Kalpathi Subramanian Department of Computer Science UNC Charlotte.
Introduction to 3D Computer Graphics and Virtual Reality McConnell text.
Basics of Rendering Pipeline Based Rendering –Objects in the scene are rendered in a sequence of steps that form the Rendering Pipeline. Ray-Tracing –A.
CSE 381 – Advanced Game Programming Basic 3D Graphics
Week 2 - Wednesday CS361.
Triangulation Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast.
Buffers Textures and more Rendering Paul Taylor & Barry La Trobe University 2009.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
CSE 470: Computer Graphics. 10/15/ Defining a Vertex A 2D vertex: glVertex2f(GLfloat x, GLfloat y); 2D vertexfloating pointopenGL parameter type.
Lesson 1.8 – Space Geometry Homework: Lesson 1.8/1-27 Chapter 1 Test Friday 10/18.
1 Graphics CSCI 343, Fall 2015 Lecture 4 More on WebGL.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 3.
Computer Graphics Basic 3D Geometry CO2409 Computer Graphics Week 5-1.
On to OpenGL Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast.
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.
1 A first OpenGL program Brian Farrimond Robina Hetherington.
Image Synthesis Rabie A. Ramadan, PhD 4. 2 Review Questions Q1: What are the two principal tasks required to create an image of a three-dimensional scene?
University of North Carolina at Greensboro
6 th Grade Math Homework Chapter 7-7 Page 354 #1-8 & #23-29 (Spiral Review) Answers.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
A Photograph of two papers
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
1 Programming with OpenGL Part 2: Complete Programs.
OpenGL API 2D Graphic Primitives Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 15 Creating 3D Models.
Introduction to Meshes Lecture 22 Mon, Oct 20, 2003.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 21.
Chapter 10 Measurement Section 10.5 Surface Area.
On to 3D Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast.
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 12.
Vocabulary for the Common Core Sixth Grade.  base: The side of a polygon that is perpendicular to the altitude or height. Base of this triangle Height.
Introduction to 3D Solids and Solids of Revolution Some 3D shapes can be formed by revolving a 2D shape around a line (called the axis of revolution).
Three-dimensional figures, or solids, can be made up of flat or curved surfaces. Faces– the polygons that make the polyhedron Edges– A line segment formed.
Computer Graphics I, Fall Programming with OpenGL Part 2: Complete Programs.
3D Ojbects: Transformations and Modeling. Matrix Operations Matrices have dimensions: Vectors can be thought of as matrices: v=[2,3,4,1] is a 1x4 matrix.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
A Photograph of two papers The Model: 2 papers – 8cm x 8cm and 5cm x 5cm The Camera – Simple pinhole – No focusing capability The Scene – Arrangements.
Introduction to Computer Graphics
Three Dimensional Viewing
May look at figures in box to give you some ideas. Geometric Solid:
University of North Carolina at Greensboro
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
Programming with OpenGL Part 2: Complete Programs
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
OpenGL API 2D Graphic Primitives
Programming with OpenGL Part 2: Complete Programs
Starting to draw dealing with Windows which libraries? clipping
Class 1: First Program.
Introduction to Computer Graphics
Lecture 13 Clipping & Scan Conversion
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 9.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 8.
Programming with OpenGL Part 2: Complete Programs
Programming with OpenGL Part 2: Complete Programs
Starting to draw dealing with Windows which libraries? clipping
CS297 Graphics with Java and OpenGL
Programming with OpenGL Part 2: Complete Programs
Presentation transcript:

Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 2

Figure 2.1: Screenshot of square.cpp.

Figure 2.2: OpenGL window of square.cpp (bluish green pretending to be white).

Figure 2.3: The coordinate axes on the OpenGL window of square.cpp? No.

Figure 2.4: The coordinate axes on the OpenGL window of square.cpp? Almost there …

Figure 2.5: Viewing box of glOrtho(left, right, bottom, top, near, far).

Figure 2.6: (a) Viewing box of square.cpp (b) With the square drawn inside.

Figure 2.7: Rendering with glOrtho().

Figure 2.8: The viewing face for square.cpp, given that one unit along each coordinate axis is 1 cm., scaled to a 500 pixel x 500 pixel OpenGL window.

Figure 2.9: The x-, y- and z-axes are rectangular and form a (a) right- handed system (b) left-handed system.

Figure 2.10: A dedicated 3D graphics programmer in a world all her own.

Figure 2.11: The viewing box of square.cpp dened by glOrtho(-100, 100.0, , 100.0, -1.0, 1.0).

Figure 2.12: The screen's coordinate system: a unit along either axis is the pitch of a pixel.

Figure 2.13: Screenshot of a triangle.

Figure 2.14: Screenshot of the triangle clipped to a quadrilateral.

Figure 2.15: Six clipping planes of the glOrtho(left, right, bottom, top, near, far) viewing box. The lightly shaded part of the triangle sticking out of the box is clipped by a “clipping knife”.

Figure 2.16: A triangle fan.

Figure 2.17: Screenshot of a green square drawn in the code after a red square.

Figure 2.18: Screenshot of a square with differently colored vertices.

Figure 2.19: OpenGL's geometric primitives. Vertex order is indicated by a curved arrow. Primitives inside the red rectangle have been discarded from the core profile of later versions of OpenGL, e.g., 4.3; however, they are accessible via the compatibility profile.

Figure 2.20: (a) Square Annulus – the region between two bounding squares – and a possible triangulation (b) A partially triangulated shape.

Figure 2.21: OpenGL polygons should be planar and convex.

Figure 2.22: Outputs: (a) Experiment 2.16 (b) Experiment 2.17 (c) Experiment 2.17, vertices cycled.

Figure 2.23: Double annulus.

Figure 2.24: Screenshot of circle.cpp.

Figure 2.25: (a) A line loop joining a sample of points from a circle (b) Parametric equations for a circle.

Figure 2.26: Screenshot of parabola.cpp.

Figure 2.27: Flat spiral.

Figure 2.28: Flat leaf.

Figure 2.29: Screenshot of circularAnnuluses.cpp.

Figure 2.30: (a) The front white disc obscures part of the red one (b) The point A with largest z-value is projected onto the viewing plane so P is red.

Figure 2.31: Bull's eye target.

Figure 2.32: Parametric equations for a helix.

Figure 2.33: Screenshots of helix.cpp using orthographic projection with the helix coiling around the: (a) z-axis (b) y-axis.

Figure 2.34: Rendering with glFrustum().

Figure 2.35: Section of the viewing frustum showing foreshortening.

Figure 2.36: Screenshots of helix.cpp using perspective projection with the helix coiling up the (a) z-axis (b) y-axis.

Figure 2.37: Screenshot of moveSphere.cpp.

Figure 2.38: Draw these!

Figure 2.39: (a) Spherical and Cartesian coordinates on a hemisphere (b) Approxi- mating a hemisphere with latitudinal triangle strips.

Figure 2.40: Screenshot of hemisphere.cpp.

Figure 2.41: (a) Half a hemisphere (b) Slice of a hemisphere.

Figure 2.42: More things to draw.