The Virtual Camera. The Virtual Camera. Setting the View Volume. Perspective Camera

Size: px
Start display at page:

Download "The Virtual Camera. The Virtual Camera. Setting the View Volume. Perspective Camera"

Transcription

1 The Virtual Camera The Virtual Camera The Camera is defined by using a parallelepiped as a view volume with two of the walls used as the near and far view planes OpenGL also allows for a perspective view to be created, this is done by changing the shape of the view volume. Perspective Camera The Camera has an eye positioned at some point in space. Its view volume is a portion of a rectangular pyramid, whose apex is at the eye. The opening of the pyramid is set by the viewangle θ (part b of figure) Two planes are defined perpendicular to the axis of the pyramid : the near and the far plane. Where these planes intersect the pyramid they form rectangular windows which have an adjustable aspect ratio. OpenGL clips points which lie outside the view volume. Points lying inside the the view volume are projected onto the viewplane to a corresponding point P' With a perspective projection the point P' is determined by finding where a line from the eye to P intersects the viewplane. Setting the View Volume OpenGL provides a simple way to set the view volume in a program by setting the projection Matrix This is done using gluperspective as follows

2 OpenGL Code Listing 1: Set Camera Projection Function 1 void SetCameraProjection(Real fov,real w, Real h, Real near, Real far) 2 { 3 glviewport(0,0,w,h); 4 glmatrixmode(gl_projection); 5 glloadidentity(); 6 gluperspective(fov,(real)w/h,near,far); 7 glmatrixmode(gl_modelview); 8 9 } Setting The Perspective The parameter fov, shown as θ in the figure is given in degrees and sets the angle between the top and bottom walls of the pyramid. The parameters w and h sets the aspect ratio of any window parallel to the xy-plane The value N is the distance from the eye to the near plane, and F is the distance from the eye to the far plane. N and F should be positive. Positioning and Pointing the Camera In order to obtain the desired view of a scene, we move the camera from its default position as shown in the previous slide To point it in a particular direction we need to perform rotations and translations which result in changes to the modelview matrix 1 glmatrixmode(gl_modelview); 2 3 glloadidentity(); 4 glulookat(eye.x,eye.y,eye.z, 5 look.x,look.y,look.z, 6 up.x,up.y,up.z); The code moves the camera so that the eye resides at point eye it looks towards the point of interest look The General Camera with Arbitrary Orientation and Position It is useful to attach an explicit co-ordinate system to the camera as shown in the figure above. This co-ordinate system has its origin at the eye and has three axes, usually called the u-,v-, and n-axis which define the orientation of the camera The axes are pointed in directions given by the vectors u,v, and n Because, by default, the camera looks down the negative z-axis, we say in general that the camera looks down the negative n-axis in the direction -n The direction u points off to the right of the camera and the direction v points upward

3 Spherical Geometry Spherical Co-ordinates Using trigonometry we can work out a relationship between spherical coordinates and Cartesian coordinates (u x,u y,u z ) for U the equations are u x = Rcos(φ)cos(θ), u y = Rsin(φ), and u z = Rcos(φ)sin(θ) The above figure shows how a point U is defined in spherical coordinates. R is the radial distance of U from the origin, and φ is the angle that U makes with the xz-plane, know as the latitude of the point U. θ is the azimuth of U, the angle between the xy-plane and the plane through U and the y-axis. φ lies in the interval π 2 φ < π 2 and θ lies in the range 0 θ < 2π We can also invert the relations to express (R, φ, θ) in terms of (u x,u y,u z ) R = u 2 x + u 2 y + u 2 z, φ = sin ( 1 u y ) R, θ = arctan(uz,u x ) The function arctan(,) is the two argument form of the arctangent, defined as (atan2 in C) 8 tan >< 1 (y/x) if x > 0 π + tan arctan(y, x) = 1 (y/x) if x < 0 π/2 if x =0and y > 0 >: π/2 if x =0and y < 0 Example Suppose that Point U is at a distance 2 from the origin, is 60 o up from the xz-plane, and is along the negative x-axis. Hence U is in the xy-plane. Then U is expressed in spherical coordinates as (2, 60 o, 180 o ) To convert this to Cartesian coordinates we use the equations : u x = Rcos(φ)cos(θ), u y = Rsin(φ), u z = Rcos(φ)sin(θ) Where u x =2cos(60 o )cos(180 o )=-1 u y =2sin(60 o )=1.732 u z =2cos(60 o )sin(180 o ) 0 C++ Example 1 #include <iostream> 2 #include <cmath> 3 4 int main() 5 { 6 float deg2rad=m_pi/180.0f; 7 8 float phi=60*deg2rad; 9 float theta=180*deg2rad; 10 float radius=2.0; std::cout<<"x = "<<radius*cos(phi)*cos(theta)<<std::endl; 13 std::cout<<"y = "<<radius*sin(phi)<<std::endl; 14 std::cout<<"z = "<<radius*cos(phi)*sin(theta)<<std::endl; 15 }

4 Direction Cosines The direction of point U in the previous example is given in terms of two angles : the azimuth and the latitude. Directions are often specified in an alternative useful way through direction cosines. The direction cosines of a line through the origin are the cosines of the three angles it makes with the x,y and z axes respectively. Recall that the cosine of the angle between two unit vectors is given by their dot product. Using the given point U we form the position vector (u x,u y,u z ) We also know that the length of the vector is R so we normalise it to unit length thus m = (u x /R, u y /R, u z /R) Direction Cosines II Then the cosine of the angle it makes with the x axis is given by the dot product m i = u x /R which is the first component of m Similarly the second and third components of m are the second and third direction cosines respectively Calling the angles made with the x,y and z axis α, β and γ respectively, we have, for the three direction cosines for the line from 0 to U cos(α) = ux cos(β) = uy and cos(γ) = uz R R, R, Note that the three direction cosines are related, since the sum of their squares is always unity Describing Orientation Describing Orientation Position is easy to describe, but orientation is difficult. It helps to specify orientation using the aviation terms pitch,heading,yaw and roll as shown in the figure above The pitch of an air plane is the angle that its longitudinal axis (running from tail to nose having direction -n) makes with the plane. A roll is a rotation about the longitudinal axis; the roll is the amount of rotation relative to the horizontal. An airplane's heading is the direction it is headed (This is also called azimuth and bearing) To find the heading and the pitch, given n simply express n in spherical coordinates, as shown in the figure The vector n has longitude and latitude given by the angles θ and φ respectively. The heading of the plane is given by the longitude of n and the pitch is given by the latitude of n

5 Finding roll, pitch, and heading given vectors u, v, and n. Assuming the camera is based on a coordinate system with axes in the directions u, v, and n, all unit vectors. The heading and pitch of the camera is denoted by θ and φ. The relationship of Cartesian and spherical coordinates system is given by: Camera n x = cos(φ)cos(θ) n y = sin(φ) n x = sin(φ)cos(θ) { θ = tan 1 ( n z/ n x) φ = sin 1 ( n y) The roll of the camera is the angle its u-axis makes with the horizontal, To find it construct a vector b = j n =(n z, 0, n x) b j =(j n) j =0 bis horizontal b n =(j n) n =0 bis perpendicular to n and therefore lies in the uv-plane Since b = n 2 x + n 2 z b u = u xn z u zn x The angle between b and u is given by cos(roll) = b u b = ( uxnz uznx n 2 x +n 2 z ) ) so the roll of the camera can be expressed as ( roll = cos 1 uxnz uznx n 2 x +n2 z heading = arctan( n z, n x) and pitch = sin 1 ( n y) The above figure shows a camera with the same co-ordinate system attached to it It has u-,v- and n-axes and an origin at position eye b) shows the camera with a roll applied to it c) shows the camera with zero roll or no-roll camera The u-axis of a no-roll camera is horizontal, that is perpendicular to the y-axis of the world Note that a no-roll camera can still have an arbitrary n direction, so it can have any pitch or heading. Camera Control The function glulookat is handy for setting up an initial camera as we usually have a good idea where to place eye and look However it is harder to visualise how to choose up to obtain a certain roll and it is quite difficult to make relative adjustments to the camera later using only glulookat This is due to the fact that glulookat uses Cartesian coordinates whereas orientation deals with angles and rotations about axes. OpenGL doesn't give us direct access to the vectors u,v and n so we need to maintain them in code. What glulookat does What are the directions of u,v and n when we execute glulookat() with given values for eye, look and up If given the locations of eye, look and up, we immediately know than n must be parallel to the vector eye-look, as shown above. so we can set n=eye-look We now need to find a u and a v that are perpendicular to n and to each other. The u direction points off to the side of a camera, so it is natural to make it perpendicular to up which the user has said is the upward direction.

6 What glulookat does II An easy way to build a vector that is perpendicular to two given vector is to form their cross product, so we set u=up x n The user should not choose an up direction that is parallel to n, because u then would have zero length. We choose u=up x n rather than n x up so that u will point to the right as we look along -n With u and n formed it is easy to determine v as it must be perpendicular to both and is thus the cross product of u and n thus v=n x u Notice that v will usually not be aligned with up as v must be aimed perpendicular to n whereas the user provides up as a suggestion of upwardness and the only property of up that is used is its cross product with n glulookat III To summarise, given eye look and up, we form n = eye look u = up n and v = n u and then normalise the vectors to unit length. How glulookat modifies the modelview Matrix How glulookat modifies the modelview Matrix This means that V must transform eye into the origin, u into the vector i, v into j, and nk The modelview is the product of two matrices the matrix V that accounts for the transformation of the world point into camera coordinates. and M that embodies all of the modelling transformations applied to the points. The function glulookat builds the V matrix and post-multiplies the current matrix by it. Because the job of the V matrix is to convert world co-ordinates to camera coordinates it must transform the camera's coordinate system into the generic position for the camera as shown in the figure. The easiest way to define V is to use the following matrix V = u x u y u z d x v x v y v z d y n x n y n z d z Where (d x,d y,d z )=( eye u, eye v, eye n) The matrix V is created by glulookat and post-multiplies the current matrix.

7 The Camera Revisited In order to have full control over the viewing of a scene we need to create our own Camera After each change to the camera's state the camera will tell OpenGL where the current View of the scene is by modifying the GL_MODELVIEW matrix When we use the Camera class we create a camera by setting the EYE, LOOK as points and UP as a vector. We then call the functions roll, pitch, yaw and slide to move the camera's position. A Camera Class m_eye m_look m_up m_u m_v m_n m_modelview m_projection Building the Camera 1 void Camera :: Set( 2 const Vector &_eye, 3 const Vector &_look, 4 const Vector &_up 5 ) 6 { 7 // make U, V, N vectors 8 m_eye=_eye; 9 m_look=_look; 10 m_up=_up; m_n=m_eye-m_look; 13 m_u=m_up.cross(m_n); 14 m_v=m_n.cross(m_u); 15 // now normalize 16 m_u.normalize(); 17 m_v.normalize(); 18 m_n.normalize(); 19 SetModelViewMatrix(); 20 } setting the ModelView matrix 1 void Camera::SetModelViewMatrix() 2 { 3 // grab a pointer to the matrix so we can index is quickly 4 Real *M=(Real *)&m_modelview.m_m; 5 6 M[0] = m_u.m_x; M[4] = m_u.m_y; M[8] = m_u.m_z; M[12] = -m_eye.dot(m_u); 7 M[1] = m_v.m_x; M[5] = m_v.m_y; M[9] = m_v.m_z; M[13] = -m_eye.dot(m_v); 8 M[2] = m_n.m_x; M[6] = m_n.m_y; M[10] = m_n.m_z; M[14] = -m_eye.dot(m_n); 9 M[3] = 0; M[7] = 0; M[11] = 0; M[15] = 1.0; 10 // now load them GL modelview matrix 11 m_modelview.loadmodelview(); 12 } 1 void Matrix::LoadModelView() const 2 { 3 glmatrixmode(gl_modelview); 4 glloadmatrixf(m_opengl); 5 }

8 Scale 2.0 r l 0 0 r+l r l Orthographic Projection Translate t b 0 t+b t b f+n f n f n void Camera::SetOrthoProjection() 2 { 3 m_projection.identity(); 4 5 m_projection.m_m[0][0]=2.0f /(m_r-m_l); 6 m_projection.m_m[0][3]=-((m_r+m_l)/(m_r-m_l)); 7 8 m_projection.m_m[1][1]=2.0f/(m_t-m_b); 9 m_projection.m_m[1][3]=-((m_t+m_b)/(m_t-m_b)); m_projection.m_m[2][2]=2.0f / (m_fr-m_nr) ; 12 m_projection.m_m[2][3]=-((m_fr+m_nr) /(m_fr-m_nr)); m_projection.m_m[3][3]=1.0f; m_projection.loadprojection(); 17 } ( ) fovy f = cot 2 f aspect f 0 0 f+n f n Perspective Projection 2fn f n 1 void Camera::SetPerspProjection() 2 { 3 float f= 1.0/tan((m_fov * M_PI / 360.0f)/2.0); 4 m_projection.identity(); 5 6 m_projection.m_m[0][0]=f/m_aspect; 7 m_projection.m_m[1][1]=f; 8 9 m_projection.m_m[2][2]=(m_zfar+m_znear)/(m_znear-m_zfar); 10 m_projection.m_m[2][3]=(2*m_zfar*m_znear)/(m_znear-m_zfar); m_projection.m_m[3][2]=-1; // need to transpose to get the correct values 15 m_projection.transpose(); 16 m_projection.loadprojection(); 17 } Slide 1 void Camera :: Slide( 2 const Real _du, 3 const Real _dv, 4 const Real _dn 5 ) 6 { 7 // slide eye by amount du * u + dv * v + dn * n; 8 m_eye.m_x += _du * m_u.m_x + _dv * m_v.m_x + _dn * m_n.m_x; 9 m_eye.m_y += _du * m_u.m_y + _dv * m_v.m_y + _dn * m_n.m_y; 10 m_eye.m_z += _du * m_u.m_z + _dv * m_v.m_z + _dn * m_n.m_z; 11 SetModelViewMatrix(); 12 } 1 void Camera::MoveEye( 2 const Real _dx, 3 const Real _dy, 4 const Real _dz 5 ) 6 { 7 m_eye.m_x+=_dx; 8 m_eye.m_y+=_dy; 9 m_eye.m_z+=_dz; 10 m_n=m_eye-m_look; 11 m_u.set(m_up.cross(m_n)); 12 m_v.set(m_n.cross(m_u)); 13 // normalize the vectors 14 m_u.normalize(); 15 m_v.normalize(); 16 m_n.normalize(); 17 // pass to OpenGL 18 SetModelViewMatrix(); 19 } 1 void Camera::MoveLook( 2 const Real _dx, 3 const Real _dy, 4 const Real _dz 5 ) 6 { 7 m_look.m_x+=_dx; 8 m_look.m_y+=_dy; 9 m_look.m_z+=_dz; 10 m_n=m_eye-m_look; 11 m_u.set(m_up.cross(m_n)); 12 m_v.set(m_n.cross(m_u)); 13 // normalise vectors 14 m_u.normalize(); 15 m_v.normalize(); 16 m_n.normalize(); 17 // pass to OpenGL 18 SetModelViewMatrix(); 19 }

9 Rotating the Camera To roll the camera is to rotate it about its own n- axis. This means that both the directions u and v must be rotated as shown below We form two new axes u' and v' that lie in the same plane as u and u, yet have been rotated through the angle α radians. To do this we need to form u' as the appropriate linear combination of u and v and similarly for v' rolling the Camera u = cos(α)u + sin(α)v v = sin(α)u+cos(α)v To roll the camera we need to replace the current u and v axes with the new u' and v' axes 1 void Camera:: RotAxes( 2 Vector& io_a, 3 Vector& io_b, 4 const Real _angle 5 ) 6 { 7 // rotate orthogonal vectors a (like x axis) and b(like y axis) through angle degrees 8 // convert to radians 9 Real ang = M_PI/180.0f*_angle; 10 // pre-calc cos and sine 11 Real c = cos(ang); 12 Real s = sin(ang); 13 // tmp for io_a vector 14 Vector t( c * io_a.m_x + s * io_b.m_x, c * io_a.m_y + s * io_b.m_y, c * io_a.m_z + s * io_b.m_z); 15 // now set to new rot value 16 io_b.set(-s * io_a.m_x + c * io_b.m_x, -s * io_a.m_y + c * io_b.m_y, -s * io_a.m_z + c * io_b.m_z); 17 // put tmp into _a' 18 io_a.set(t.m_x, t.m_y, t.m_z); 19 } 1 void Camera :: Roll( 2 const Real _angle 3 ) 4 { 5 RotAxes(m_u, m_v, -_angle); 6 SetModelViewMatrix(); 7 } 8 9 void Camera :: Pitch( 10 const Real _angle 11 ) 12 { 13 RotAxes(m_n, m_v, _angle); 14 SetModelViewMatrix(); 15 } void Camera :: Yaw( 18 const Real _angle 19 ) 20 { 21 RotAxes(m_u, m_n, _angle); 22 SetModelViewMatrix(); 23 } Using the Camera 1 #include <ngl/camera.h> 2 #include <ngl/vector.h> 3 4 ngl::camera cam; 5 6 // set the different vectors for the camera positions 7 ngl::vector EYE(0,5,8); 8 ngl::vector LOOK=0.0; 9 ngl::vector UP(0,1,0); float aspect=1024.0/768.0; cam.set(eye,look,up); 14 cam.setshape(45.0f,aspect, 0.2f,20.0f,ngl::PERSPECTIVE);

10 PathCamera The paths camera inherits all the features of the main Camera class and extends it to have the eye and look follow a path The path is created using two BezierCurves from the BezierCurve class The paths may be constructed using a series of points or from a file (exported from maya) 1 #include "ngl/beziercurve.h" 2 #include "ngl/pathcamera.h" 3 #include "ngl/vector.h" 4 5 ngl::pathcamera *pcam; 6 7 // Bezier Curve method 8 ngl::beziercurve curve; 9 curve.addpoint(5,1,0); 10 curve.addpoint(2,3,5); 11 curve.addpoint(-2,3,5); 12 curve.addpoint(-5,1,0); 13 curve.setlod(100); 14 curve.createknots(); 15 curve.createdisplaylist(); ngl::beziercurve curve2; 18 curve2.addpoint(2,0.1,1); 19 curve2.addpoint(1,0.5,-3); 20 curve2.addpoint(-1,0.5,-3); 21 curve2.addpoint(-2,0.1,1); 22 curve2.setlod(100); 23 curve2.createknots(); 24 curve2.createdisplaylist(); pcam = new ngl::pathcamera(ngl::vector(0,1,0),curve,curve2,0.001,ngl::perspective); 27 pcam->createcurvesfordrawing(400); 28 float aspect=1024.0/720.0; 29 // finally set the shape of the camera 30 pcam->setshape(45.0,aspect,0.5,50.0,ngl::perspective); 31 // set the active camera 32 pcam->use(); pcam->updatelooped(); 36 1 #include "ngl/beziercurve.h" 2 #include "ngl/pathcamera.h" 3 #include "ngl/vector.h" 4 5 ngl::pathcamera *pcam; 6 // file method 7 8 pcam = new ngl::pathcamera(ngl::vector(0,1,0),"loop.dat",0.001,ngl::perspective); 9 10 // end file method 11 */ 12 // now we set the level of detail for the curve 13 pcam->createcurvesfordrawing(400); // finally set the shape of the camera 16 pcam->setshape(45.0,1024.0/720.0,0.5,50.0,ngl::perspective); 17 // set the active camera 18 pcam->use();

11 1 import maya.openmaya as OM 2 import maya.openmayaanim as OMA 3 import maya.cmds as cmds 4 5 def ExportCurvesToOpenGLCamera(fname,eyeCurve,lookCurve) : 6 # get the control points of both the curves 7 EyePoints=cmds.getAttr( lookcurve+".cv[*]" ) 8 LookPoints=cmds.getAttr( eyecurve+".cv[*]" ) 9 # open the file 10 ofile=open(fname,'w') 11 #write out the number of cp in each curve 12 ofile.write("%d %d\n" %( len(eyepoints),len(lookpoints)) ) 13 # get curve Transformaiton matrix values 14 Ltx=cmds.getAttr(lookCurve+".xformMatrix") 15 Etx=cmds.getAttr(eyeCurve+".xformMatrix") 16 # create an empty matrix for both the curves 17 LtxM = OM.MMatrix() 18 EtxM = OM.MMatrix() # Create a matrix using the list 21 OM.MScriptUtil.createMatrixFromList( Ltx, LtxM) 22 OM.MScriptUtil.createMatrixFromList( Etx, EtxM) for n in range(0,len(eyepoints)) : 26 # convert the CP to a Point 27 worldpos = OM.MPoint(EyePoints[n][0],EyePoints[n][1],EyePoints[n][2]) 28 # multiply this by the TX matrix 29 e = worldpos*etxm 30 # write to the file 31 ofile.write("%f %f %f \n" %(e[0],e[1],e[2])) for n in range(0,len(lookpoints)) : 34 worldpos = OM.MPoint(LookPoints[n][0],LookPoints[n][1],LookPoints[n][2]) 35 e = worldpos*ltxm 36 ofile.write("%f %f %f \n" %(e[0],e[1],e[2])) ofile.close() ExportCurvesToOpenGLCamera("/Users/jmacey/Cam.txt","curve2","curve1") References Computer Graphics With OpenGL, F.S. Hill jr, Prentice Hall (most images from the instructors pack of this book) Basic Algebra and Geometry. Ann Hirst and David Singerman. Prentice Hall 2001 "Essential Mathematics for Computer Graphics fast" John VinceSpringer- Verlag London "Geometry for Computer Graphics: Formulae, Examples and Proofs" John Vince Springer-Verlag London 2004

Friday, 4 December The Virtual Camera

Friday, 4 December The Virtual Camera The Virtual Camera The Virtual Camera The Camera is defined by using a parallelepiped as a view volume with two of the walls used as the near and far view planes OpenGL also allows for a perspective view

More information

Visualisation Pipeline : The Virtual Camera

Visualisation Pipeline : The Virtual Camera Visualisation Pipeline : The Virtual Camera The Graphics Pipeline 3D Pipeline The Virtual Camera The Camera is defined by using a parallelepiped as a view volume with two of the walls used as the near

More information

Transformations and The Virtual Camera

Transformations and The Virtual Camera Transformations and The Virtual Camera Transformation When doing 3D graphics, we are actually converting some form of virtual 3D representation into a 2D form This is know as a projection an we can do

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics 3D Viewing and Projection Yong Cao Virginia Tech Objective We will develop methods to camera through scenes. We will develop mathematical tools to handle perspective projection.

More information

Monday, 12 November 12. Matrices

Monday, 12 November 12. Matrices Matrices Matrices Matrices are convenient way of storing multiple quantities or functions They are stored in a table like structure where each element will contain a numeric value that can be the result

More information

Friday, 11 January 13. Object Representation

Friday, 11 January 13. Object Representation Object Representation 3D Object Representation So far we have used the notion of expressing 3D data as points(or vertices) in a Cartesian or Homogeneous coordinate system. We have simplified the representation

More information

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects Object Representation Affine Transforms Polygonal Representation of Objects Although perceivable the simplest form of representation they can also be the most problematic. To represent an object polygonally,

More information

CSC 470 Computer Graphics

CSC 470 Computer Graphics CSC 47 Computer Graphics Three Dimensional Viewing Today s Lecture Three Dimensional Viewing Developing a Camera Fly through a scene Mathematics of Producing Stereo Views 1 2 Introduction We have already

More information

CSC 470 Computer Graphics. Three Dimensional Viewing

CSC 470 Computer Graphics. Three Dimensional Viewing CSC 470 Computer Graphics Three Dimensional Viewing 1 Today s Lecture Three Dimensional Viewing Developing a Camera Fly through a scene Mathematics of Projections Producing Stereo Views 2 Introduction

More information

THE VIEWING TRANSFORMATION

THE VIEWING TRANSFORMATION ECS 178 Course Notes THE VIEWING TRANSFORMATION Kenneth I. Joy Institute for Data Analysis and Visualization Department of Computer Science University of California, Davis Overview One of the most important

More information

Fall 2016 Semester METR 3113 Atmospheric Dynamics I: Introduction to Atmospheric Kinematics and Dynamics

Fall 2016 Semester METR 3113 Atmospheric Dynamics I: Introduction to Atmospheric Kinematics and Dynamics Fall 2016 Semester METR 3113 Atmospheric Dynamics I: Introduction to Atmospheric Kinematics and Dynamics Lecture 5 August 31 2016 Topics: Polar coordinate system Conversion of polar coordinates to 2-D

More information

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes

The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes The Viewing Pipeline adaptation of Paul Bunn & Kerryn Hugo s notes What is it? The viewing pipeline is the procession of operations that are applied to the OpenGL matrices, in order to create a 2D representation

More information

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1

1 Transformations. Chapter 1. Transformations. Department of Computer Science and Engineering 1-1 Transformations 1-1 Transformations are used within the entire viewing pipeline: Projection from world to view coordinate system View modifications: Panning Zooming Rotation 1-2 Transformations can also

More information

Viewing and Projection

Viewing and Projection CSCI 480 Computer Graphics Lecture 5 Viewing and Projection January 25, 2012 Jernej Barbic University of Southern California Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective

More information

3.1 Viewing and Projection

3.1 Viewing and Projection Fall 2017 CSCI 420: Computer Graphics 3.1 Viewing and Projection Hao Li http://cs420.hao-li.com 1 Recall: Affine Transformations Given a point [xyz] > form homogeneous coordinates [xyz1] > The transformed

More information

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5) 5493S Computer Graphics Exercise Solution (Chapters 4-5). Given two nonparallel, three-dimensional vectors u and v, how can we form an orthogonal coordinate system in which u is one of the basis vectors?

More information

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Computer Viewing. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Computer Viewing CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce the mathematics of projection Introduce OpenGL viewing functions Look at

More information

Computer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter Three-dimensional Viewing

Computer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter Three-dimensional Viewing Computer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter 7.1-4 Three-dimensional Viewing S. M. Lea University of North Carolina at Greensboro 2007, Prentice Hall Introduction

More information

The View Frustum. Lecture 9 Sections 2.6, 5.1, 5.2. Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2011

The View Frustum. Lecture 9 Sections 2.6, 5.1, 5.2. Robb T. Koether. Hampden-Sydney College. Wed, Sep 14, 2011 The View Frustum Lecture 9 Sections 2.6, 5.1, 5.2 Robb T. Koether Hampden-Sydney College Wed, Sep 14, 2011 Robb T. Koether (Hampden-Sydney College) The View Frustum Wed, Sep 14, 2011 1 / 36 Outline 1 The

More information

3D Viewing Episode 2

3D Viewing Episode 2 3D Viewing Episode 2 1 Positioning and Orienting the Camera Recall that our projection calculations, whether orthographic or frustum/perspective, were made with the camera at (0, 0, 0) looking down the

More information

Grad operator, triple and line integrals. Notice: this material must not be used as a substitute for attending the lectures

Grad operator, triple and line integrals. Notice: this material must not be used as a substitute for attending the lectures Grad operator, triple and line integrals Notice: this material must not be used as a substitute for attending the lectures 1 .1 The grad operator Let f(x 1, x,..., x n ) be a function of the n variables

More information

Lecture 9 Sections 2.6, 5.1, 5.2. Wed, Sep 16, 2009

Lecture 9 Sections 2.6, 5.1, 5.2. Wed, Sep 16, 2009 Lecture 9 Sections 2.6, 5.1, 5.2 Hampden-Sydney College Wed, Sep 16, 2009 Outline 1 2 3 4 5 6 Controlling 7 Definition () A frustum is a truncated pyramid. Definition ( ) The view frustum is the region

More information

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6 Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points

More information

Computer Viewing Computer Graphics I, Fall 2008

Computer Viewing Computer Graphics I, Fall 2008 Computer Viewing 1 Objectives Introduce mathematics of projection Introduce OpenGL viewing functions Look at alternate viewing APIs 2 Computer Viewing Three aspects of viewing process All implemented in

More information

Prof. Feng Liu. Fall /19/2016

Prof. Feng Liu. Fall /19/2016 Prof. Feng Liu Fall 26 http://www.cs.pdx.edu/~fliu/courses/cs447/ /9/26 Last time More 2D Transformations Homogeneous Coordinates 3D Transformations The Viewing Pipeline 2 Today Perspective projection

More information

Viewing and Projection

Viewing and Projection CSCI 480 Computer Graphics Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Geri s Game, Pixar, 1997] January 26, 2011

More information

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below: Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points

More information

3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing

3D Graphics for Game Programming (J. Han) Chapter II Vertex Processing Chapter II Vertex Processing Rendering Pipeline Main stages in the pipeline The vertex processing stage operates on every input vertex stored in the vertex buffer and performs various operations such as

More information

CS 543: Computer Graphics Lecture 6 (Part I): 3D Viewing and Camera Control. Emmanuel Agu

CS 543: Computer Graphics Lecture 6 (Part I): 3D Viewing and Camera Control. Emmanuel Agu CS 543: Computer Graphics Lecture 6 (Part I): 3D Viewing and Camera Control Emmanuel Agu 3D Viewing Similar to taking a photograph Control the lens of the camera Project the object from 3D world to 2D

More information

OpenGL Transformations

OpenGL 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 information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu

More information

CSE328 Fundamentals of Computer Graphics

CSE328 Fundamentals of Computer Graphics CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu

More information

MATHEMATICS 105 Plane Trigonometry

MATHEMATICS 105 Plane Trigonometry Chapter I THE TRIGONOMETRIC FUNCTIONS MATHEMATICS 105 Plane Trigonometry INTRODUCTION The word trigonometry literally means triangle measurement. It is concerned with the measurement of the parts, sides,

More information

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization Overview Viewing and perspectives Classical views Computer viewing Perspective normalization Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface

More information

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space

Basic Elements. Geometry is the study of the relationships among objects in an n-dimensional space Basic Elements Geometry is the study of the relationships among objects in an n-dimensional space In computer graphics, we are interested in objects that exist in three dimensions We want a minimum set

More information

Lecture 4. Viewing, Projection and Viewport Transformations

Lecture 4. Viewing, Projection and Viewport Transformations Notes on Assignment Notes on Assignment Hw2 is dependent on hw1 so hw1 and hw2 will be graded together i.e. You have time to finish both by next monday 11:59p Email list issues - please cc: elif@cs.nyu.edu

More information

Geometry: Outline. Projections. Orthographic Perspective

Geometry: Outline. Projections. Orthographic Perspective Geometry: Cameras Outline Setting up the camera Projections Orthographic Perspective 1 Controlling the camera Default OpenGL camera: At (0, 0, 0) T in world coordinates looking in Z direction with up vector

More information

Coordinate Transformations in Advanced Calculus

Coordinate Transformations in Advanced Calculus Coordinate Transformations in Advanced Calculus by Sacha Nandlall T.A. for MATH 264, McGill University Email: sacha.nandlall@mail.mcgill.ca Website: http://www.resanova.com/teaching/calculus/ Fall 2006,

More information

Viewing and Projection

Viewing and Projection 15-462 Computer Graphics I Lecture 5 Viewing and Projection Shear Transformation Camera Positioning Simple Parallel Projections Simple Perspective Projections [Angel, Ch. 5.2-5.4] January 30, 2003 [Red

More information

Computer Graphics (CS 543) Lecture 6a: Viewing & Camera Control. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics (CS 543) Lecture 6a: Viewing & Camera Control. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI) Computer Graphics (CS 543) Lecture 6a: Viewing & Camera Control Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) 3D Viewing? Specify a view volume Objects inside view volume

More information

16.6. Parametric Surfaces. Parametric Surfaces. Parametric Surfaces. Vector Calculus. Parametric Surfaces and Their Areas

16.6. Parametric Surfaces. Parametric Surfaces. Parametric Surfaces. Vector Calculus. Parametric Surfaces and Their Areas 16 Vector Calculus 16.6 and Their Areas Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. and Their Areas Here we use vector functions to describe more general

More information

Rendering Pipeline and Coordinates Transforms

Rendering Pipeline and Coordinates Transforms Rendering Pipeline and Coordinates Transforms Alessandro Martinelli alessandro.martinelli@unipv.it 16 October 2013 Rendering Pipeline (3): Coordinates Transforms Rendering Architecture First Rendering

More information

Review of Trigonometry

Review of Trigonometry Worksheet 8 Properties of Trigonometric Functions Section Review of Trigonometry This section reviews some of the material covered in Worksheets 8, and The reader should be familiar with the trig ratios,

More information

3D Viewing Episode 2

3D Viewing Episode 2 3D Viewing Episode 2 1 Positioning and Orienting the Camera Recall that our projection calculations, whether orthographic or frustum/perspective, were made with the camera at (0, 0, 0) looking down the

More information

Transforms. COMP 575/770 Spring 2013

Transforms. COMP 575/770 Spring 2013 Transforms COMP 575/770 Spring 2013 Transforming Geometry Given any set of points S Could be a 2D shape, a 3D object A transform is a function T that modifies all points in S: T S S T v v S Different transforms

More information

Answers to practice questions for Midterm 1

Answers to practice questions for Midterm 1 Answers to practice questions for Midterm Paul Hacking /5/9 (a The RREF (reduced row echelon form of the augmented matrix is So the system of linear equations has exactly one solution given by x =, y =,

More information

CSC 305 The Graphics Pipeline-1

CSC 305 The Graphics Pipeline-1 C. O. P. d y! "#"" (-1, -1) (1, 1) x z CSC 305 The Graphics Pipeline-1 by Brian Wyvill The University of Victoria Graphics Group Perspective Viewing Transformation l l l Tools for creating and manipulating

More information

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment

Notes on Assignment. Notes on Assignment. Notes on Assignment. Notes on Assignment Notes on Assignment Notes on Assignment Objects on screen - made of primitives Primitives are points, lines, polygons - watch vertex ordering The main object you need is a box When the MODELVIEW matrix

More information

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

Three-Dimensional Graphics III. Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III Guoying Zhao 1 / 67 Classical Viewing Guoying Zhao 2 / 67 Objectives Introduce the classical views Compare and contrast image formation by computer with

More information

Background for Surface Integration

Background for Surface Integration Background for urface Integration 1 urface Integrals We have seen in previous work how to define and compute line integrals in R 2. You should remember the basic surface integrals that we will need to

More information

Basics of Computational Geometry

Basics of Computational Geometry Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals

More information

Contents. MATH 32B-2 (18W) (L) G. Liu / (TA) A. Zhou Calculus of Several Variables. 1 Homework 1 - Solutions 3. 2 Homework 2 - Solutions 13

Contents. MATH 32B-2 (18W) (L) G. Liu / (TA) A. Zhou Calculus of Several Variables. 1 Homework 1 - Solutions 3. 2 Homework 2 - Solutions 13 MATH 32B-2 (8) (L) G. Liu / (TA) A. Zhou Calculus of Several Variables Contents Homework - Solutions 3 2 Homework 2 - Solutions 3 3 Homework 3 - Solutions 9 MATH 32B-2 (8) (L) G. Liu / (TA) A. Zhou Calculus

More information

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions Calculus III Math Spring 7 In-term exam April th. Suggested solutions This exam contains sixteen problems numbered through 6. Problems 5 are multiple choice problems, which each count 5% of your total

More information

3D Graphics Pipeline II Clipping. Instructor Stephen J. Guy

3D 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 information

7. 3D Viewing. Projection: why is projection necessary? CS Dept, Univ of Kentucky

7. 3D Viewing. Projection: why is projection necessary? CS Dept, Univ of Kentucky 7. 3D Viewing Projection: why is projection necessary? 1 7. 3D Viewing Projection: why is projection necessary? Because the display surface is 2D 2 7.1 Projections Perspective projection 3 7.1 Projections

More information

Fundamental Types of Viewing

Fundamental Types of Viewing Viewings Fundamental Types of Viewing Perspective views finite COP (center of projection) Parallel views COP at infinity DOP (direction of projection) perspective view parallel view Classical Viewing Specific

More information

Transformation Pipeline

Transformation 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 information

Computing the 3D Viewing Transformation

Computing the 3D Viewing Transformation Computing the 3D Viewing Transformation John E. Howland Department of Computer Science Trinity University 715 Stadium Drive San Antonio, Texas 78212-7200 Voice: (210) 999-7380 Fax: (210) 999-7477 E-mail:

More information

Mathematics 308 Geometry. Chapter 9. Drawing three dimensional objects

Mathematics 308 Geometry. Chapter 9. Drawing three dimensional objects Mathematics 308 Geometry Chapter 9. Drawing three dimensional objects In this chapter we will see how to draw three dimensional objects with PostScript. The task will be made easier by a package of routines

More information

Math (Spring 2009): Lecture 5 Planes. Parametric equations of curves and lines

Math (Spring 2009): Lecture 5 Planes. Parametric equations of curves and lines Math 18.02 (Spring 2009): Lecture 5 Planes. Parametric equations of curves and lines February 12 Reading Material: From Simmons: 17.1 and 17.2. Last time: Square Systems. Word problem. How many solutions?

More information

Viewing COMPSCI 464. Image Credits: Encarta and

Viewing COMPSCI 464. Image Credits: Encarta and Viewing COMPSCI 464 Image Credits: Encarta and http://www.sackville.ednet.ns.ca/art/grade/drawing/perspective4.html Graphics Pipeline Graphics hardware employs a sequence of coordinate systems The location

More information

Viewing with Computers (OpenGL)

Viewing with Computers (OpenGL) We can now return to three-dimension?', graphics from a computer perspective. Because viewing in computer graphics is based on the synthetic-camera model, we should be able to construct any of the classical

More information

QUIZ 4 (CHAPTER 17) SOLUTIONS MATH 252 FALL 2008 KUNIYUKI SCORED OUT OF 125 POINTS MULTIPLIED BY % POSSIBLE

QUIZ 4 (CHAPTER 17) SOLUTIONS MATH 252 FALL 2008 KUNIYUKI SCORED OUT OF 125 POINTS MULTIPLIED BY % POSSIBLE QUIZ 4 (CHAPTER 17) SOLUTIONS MATH 5 FALL 8 KUNIYUKI SCORED OUT OF 15 POINTS MULTIPLIED BY.84 15% POSSIBLE 1) Reverse the order of integration, and evaluate the resulting double integral: 16 y dx dy. Give

More information

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

1.5 Equations of Lines and Planes in 3-D

1.5 Equations of Lines and Planes in 3-D 1.5. EQUATIONS OF LINES AND PLANES IN 3-D 55 Figure 1.16: Line through P 0 parallel to v 1.5 Equations of Lines and Planes in 3-D Recall that given a point P = (a, b, c), one can draw a vector from the

More information

Multiple Integrals. max x i 0

Multiple Integrals. max x i 0 Multiple Integrals 1 Double Integrals Definite integrals appear when one solves Area problem. Find the area A of the region bounded above by the curve y = f(x), below by the x-axis, and on the sides by

More information

Computer Graphics 7: Viewing in 3-D

Computer Graphics 7: Viewing in 3-D Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations

More information

Computer Graphics. Lecture 2. Doç. Dr. Mehmet Gokturk

Computer Graphics. Lecture 2. Doç. Dr. Mehmet Gokturk Computer Graphics Lecture 2 Doç. Dr. Mehmet Gokturk Mathematical Foundations l Hearn and Baker (A1 A4) appendix gives good review l Some of the mathematical tools l Trigonometry l Vector spaces l Points,

More information

Perspective matrix, OpenGL style

Perspective matrix, OpenGL style Perspective matrix, OpenGL style Stefan Gustavson May 7, 016 Gortler s book presents perspective transformation using a slightly different matrix than what is common in OpenGL applications. This document

More information

COMP 175 COMPUTER GRAPHICS. Ray Casting. COMP 175: Computer Graphics April 26, Erik Anderson 09 Ray Casting

COMP 175 COMPUTER GRAPHICS. Ray Casting. COMP 175: Computer Graphics April 26, Erik Anderson 09 Ray Casting Ray Casting COMP 175: Computer Graphics April 26, 2018 1/41 Admin } Assignment 4 posted } Picking new partners today for rest of the assignments } Demo in the works } Mac demo may require a new dylib I

More information

Analytic Spherical Geometry:

Analytic Spherical Geometry: Analytic Spherical Geometry: Begin with a sphere of radius R, with center at the origin O. Measuring the length of a segment (arc) on a sphere. Let A and B be any two points on the sphere. We know that

More information

Fachhochschule Regensburg, Germany, February 15, 2017

Fachhochschule Regensburg, Germany, February 15, 2017 s Operations Fachhochschule Regensburg, Germany, February 15, 2017 s Motivating Example s Operations To take a photograph of a scene: Set up your tripod and point camera at the scene (Viewing ) Position

More information

LOCAL GEODETIC HORIZON COORDINATES

LOCAL GEODETIC HORIZON COORDINATES LOCAL GEODETIC HOIZON COODINATES In many surveying applications it is necessary to convert geocentric Cartesian coordinates X,,Z to local geodetic horizon Cartesian coordinates E,N,U (East,North,Up). Figure

More information

1 Double Integrals over Rectangular Regions

1 Double Integrals over Rectangular Regions Contents ouble Integrals over Rectangular Regions ouble Integrals Over General Regions 7. Introduction.................................... 7. Areas of General Regions............................. 9.3 Region

More information

Jim Lambers MAT 169 Fall Semester Lecture 33 Notes

Jim Lambers MAT 169 Fall Semester Lecture 33 Notes Jim Lambers MAT 169 Fall Semester 2009-10 Lecture 33 Notes These notes correspond to Section 9.3 in the text. Polar Coordinates Throughout this course, we have denoted a point in the plane by an ordered

More information

The Three Dimensional Coordinate System

The Three Dimensional Coordinate System The Three-Dimensional Coordinate System The Three Dimensional Coordinate System You can construct a three-dimensional coordinate system by passing a z-axis perpendicular to both the x- and y-axes at the

More information

Polar Coordinates. Chapter 10: Parametric Equations and Polar coordinates, Section 10.3: Polar coordinates 27 / 45

Polar Coordinates. Chapter 10: Parametric Equations and Polar coordinates, Section 10.3: Polar coordinates 27 / 45 : Given any point P = (x, y) on the plane r stands for the distance from the origin (0, 0). θ stands for the angle from positive x-axis to OP. Polar coordinate: (r, θ) Chapter 10: Parametric Equations

More information

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc. Chapter 1 Linear Equations and Straight Lines 2 of 71 Outline 1.1 Coordinate Systems and Graphs 1.4 The Slope of a Straight Line 1.3 The Intersection Point of a Pair of Lines 1.2 Linear Inequalities 1.5

More information

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52

INTRODUCTION TO COMPUTER GRAPHICS. It looks like a matrix Sort of. Viewing III. Projection in Practice. Bin Sheng 10/11/ / 52 cs337 It looks like a matrix Sort of Viewing III Projection in Practice / 52 cs337 Arbitrary 3D views Now that we have familiarity with terms we can say that these view volumes/frusta can be specified

More information

AQA GCSE Further Maths Topic Areas

AQA GCSE Further Maths Topic Areas AQA GCSE Further Maths Topic Areas This document covers all the specific areas of the AQA GCSE Further Maths course, your job is to review all the topic areas, answering the questions if you feel you need

More information

Overview. By end of the week:

Overview. By end of the week: Overview By end of the week: - Know the basics of git - Make sure we can all compile and run a C++/ OpenGL program - Understand the OpenGL rendering pipeline - Understand how matrices are used for geometric

More information

Trigonometric Functions of Any Angle

Trigonometric Functions of Any Angle Trigonometric Functions of Any Angle MATH 160, Precalculus J. Robert Buchanan Department of Mathematics Fall 2011 Objectives In this lesson we will learn to: evaluate trigonometric functions of any angle,

More information

Polar Coordinates. OpenStax. 1 Dening Polar Coordinates

Polar Coordinates. OpenStax. 1 Dening Polar Coordinates OpenStax-CNX module: m53852 1 Polar Coordinates OpenStax This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License 4.0 Abstract Locate points

More information

Double Integrals over Polar Coordinate

Double Integrals over Polar Coordinate 1. 15.4 DOUBLE INTEGRALS OVER POLAR COORDINATE 1 15.4 Double Integrals over Polar Coordinate 1. Polar Coordinates. The polar coordinates (r, θ) of a point are related to the rectangular coordinates (x,y)

More information

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG. Computer Vision Coordinates Prof. Flávio Cardeal DECOM / CEFET- MG cardeal@decom.cefetmg.br Abstract This lecture discusses world coordinates and homogeneous coordinates, as well as provides an overview

More information

MAC2313 Test 3 A E g(x, y, z) dy dx dz

MAC2313 Test 3 A E g(x, y, z) dy dx dz MAC2313 Test 3 A (5 pts) 1. If the function g(x, y, z) is integrated over the cylindrical solid bounded by x 2 + y 2 = 3, z = 1, and z = 7, the correct integral in Cartesian coordinates is given by: A.

More information

Computer Graphics. Chapter 10 Three-Dimensional Viewing

Computer 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

Transformation Algebra

Transformation Algebra Transformation Algebra R. J. Renka Department of Computer Science & Engineering University of North Texas 0/07/205 Linear Transformations A point with Cartesian coordinates (x, y, z) is taken to be a column

More information

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

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E Addison-Wesley 25 1 Objectives

More information

Section 10.1 Polar Coordinates

Section 10.1 Polar Coordinates Section 10.1 Polar Coordinates Up until now, we have always graphed using the rectangular coordinate system (also called the Cartesian coordinate system). In this section we will learn about another system,

More information

CSC418 / CSCD18 / CSC2504

CSC418 / CSCD18 / CSC2504 5 5.1 Surface Representations As with 2D objects, we can represent 3D objects in parametric and implicit forms. (There are also explicit forms for 3D surfaces sometimes called height fields but we will

More information

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Chapter 4 of Angel Chapter 6 of Foley, van Dam, 2 Objectives What kind of camera we use? (pinhole) What projections make sense

More information

Measuring Lengths The First Fundamental Form

Measuring Lengths The First Fundamental Form Differential Geometry Lia Vas Measuring Lengths The First Fundamental Form Patching up the Coordinate Patches. Recall that a proper coordinate patch of a surface is given by parametric equations x = (x(u,

More information

27. Tangent Planes & Approximations

27. Tangent Planes & Approximations 27. Tangent Planes & Approximations If z = f(x, y) is a differentiable surface in R 3 and (x 0, y 0, z 0 ) is a point on this surface, then it is possible to construct a plane passing through this point,

More information

COMP3421. Introduction to 3D Graphics

COMP3421. Introduction to 3D Graphics COMP3421 Introduction to 3D Graphics 3D coodinates Moving to 3D is simply a matter of adding an extra dimension to our points and vectors: 3D coordinates 3D coordinate systems can be left or right handed.

More information

CS354 Computer Graphics Viewing and Modeling

CS354 Computer Graphics Viewing and Modeling Slide Credit: Donald S. Fussell CS354 Computer Graphics Viewing and Modeling Qixing Huang February 21th 2018 Computer Viewing There are three aspects of the viewing process, all of which are implemented

More information

2D and 3D Transformations AUI Course Denbigh Starkey

2D and 3D Transformations AUI Course Denbigh Starkey 2D and 3D Transformations AUI Course Denbigh Starkey. Introduction 2 2. 2D transformations using Cartesian coordinates 3 2. Translation 3 2.2 Rotation 4 2.3 Scaling 6 3. Introduction to homogeneous coordinates

More information

Math 241, Exam 3 Information.

Math 241, Exam 3 Information. Math 241, xam 3 Information. 11/28/12, LC 310, 11:15-12:05. xam 3 will be based on: Sections 15.2-15.4, 15.6-15.8. The corresponding assigned homework problems (see http://www.math.sc.edu/ boylan/sccourses/241fa12/241.html)

More information

Parallel and perspective projections such as used in representing 3d images.

Parallel and perspective projections such as used in representing 3d images. Chapter 5 Rotations and projections In this chapter we discuss Rotations Parallel and perspective projections such as used in representing 3d images. Using coordinates and matrices, parallel projections

More information