Viewing Transformation

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Defining the Viewing Coordinate System
Announcements. Structure-from-Motion Determining the 3-D structure of the world, and/or the motion of a camera using a sequence of images taken by a moving.
Three Dimensional Viewing
Computer Graphics using OpenGL, 3 rd Edition F. S. Hill, Jr. and S. Kelley Chapter Three-dimensional Viewing S. M. Lea University of North Carolina.
John C. Hart CS 318 Interactive Computer Graphics
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
Three Dimensional Modeling Transformations
Mapping: Scaling Rotation Translation Warp
Kinematics Pose (position and orientation) of a Rigid Body
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Based on slides created by Edward Angel
3-D Geometry.
Introduction to Robotics Lecture II Alfred Bruckstein Yaniv Altshuler.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
Informationsteknologi Wednesday, November 14, 2007Computer Graphics - Class 81 Today’s class Orthogonal matrices Quaternions Shears Synthetic camera Viewing.
Linear Algebra Review CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2005.
CS 450: Computer Graphics 2D TRANSFORMATIONS
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Introduction to 3D viewing 3D is just like taking a photograph!
3D VIEWING ILLUSTRATED. WHAT YOU SEE DEPENDS ON YOUR POSITION In the real world, what you see depends on where you stand, the direction you look, how.
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 3.1: 3D Geometry Jürgen Sturm Technische Universität München.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Kinematics of Robot Manipulator
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Rotations and Translations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
K INEMATICS P OSE ( POSITION AND ORIENTATION ) OF A R IGID B ODY University of Bridgeport 1 Introduction to ROBOTICS.
Camera. Content Coordinate systems and transformations Viewing coordinates Coordinate transformation matrix Projections Window and viewport Acknowledgments:
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Transformations of Objects – 3D
Stages of Vertex Transformation To specify viewing, modeling, and projection transformations, you construct a 4 × 4 matrix M, which is then multiplied.
Computer Graphics I, Fall 2010 Computer Viewing.
SCARA – Forward Kinematics
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Radial Distortion (Extrinsic Calibration?) 1.
The Camera Course Information CVG: Programming 4 My Name: Mark Walsh Website: Recommended Reading.
2003CS Hons RW778 Graphics1 Chapter 7: Three-Dimensional Viewing Chapter 5: Camera with parallel projection Chapter 5: Camera with parallel projection.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.
Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
Graphics CSCI 343, Fall 2015 Lecture 16 Viewing I
Composite 3D Transformations. Example of Composite 3D Transformations Try to transform the line segments P 1 P 2 and P 1 P 3 from their start position.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
January 19, y X Z Translations Objects are usually defined relative to their own coordinate system. We can translate points in space to new positions.
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Lecture 5: Introduction to 3D
Computer Graphics Matrices
CS 4731: Computer Graphics Lecture 12: More 3D Viewing Emmanuel Agu.
Composite 3D Transformations. Example of Composite 3D Transformations Try to transform the line segments P 1 P 2 and P 1 P 3 from their start position.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
EE 495 Modern Navigation Systems Navigation Mathematics Rotation Matrices – Part II Wednesday, Jan 14 EE 495 Modern Navigation Systems Slide 1 of 21.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Computer Viewing Isaac Gang University of Mary Hardin-Baylor.
End effector End effector - the last coordinate system of figure Located in joint N. But usually, we want to specify it in base coordinates. 1.
Matrix Transformations Reference: “3D Math Primer for Graphics and Game Development” – , , , , 9.4
Building a Camera in a Program Need: To have fine control over camera movements we create and manipulate our own camera in a program Steps: 1.Create Camera.
Learning from the Past, Looking to the Future James R. (Jim) Beaty, PhD - NASA Langley Research Center Vehicle Analysis Branch, Systems Analysis & Concepts.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Viewing Viewing and viewing space (camera space)
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
Finding Direction Angles of Vectors
Reflections in Coordinate Plane
Derivation of the 2D Rotation Matrix
Presentation transcript:

Viewing Transformation Tong-Yee Lee

Changes of Coordinate System World coordinate system Camera (eye) coordinate system

Default Camera Position and Orientation The default camera is with eye at the origin (0,0,0) and the axis of the pyramid aligned with the z-axis. The eye is looking down the negative z-axis.

In this equation, a is world coordinate, B will convert a to b (in another coordinate system)

Why B is orthonormal? In above equation, 0 is due to vi.vj=0 i!=j

b1=Bw->1aw aw=Bw->1Tb1=B-w->1b1 b2=Bw->2aw aw=Bw->2Tb2=B-w->2b2 B-w->1b1=B-w->2b2 Bw->1B-w->1b1= Bw->1B-w->2b2 b1= Bw->1B-w->2 b2= Bw->1B2->w b2

Consider a special case as v1=(1,0,0), v2=(0,1,0) and v3(0,0,1)

This is same as previous matrix composition by way of a is coordinate in (v1,v2,v3) system (usually is world coordinate) b is coordinate in (u1,u2,u3) system B is easily remembered by carefully checking B The first row: u1 projects on three axes v1,v2,v3 The second row: u2 projects on three axes v1,v2,v3 The third row: u3 projects on three axes v1,v2,v3 How about B’ for c is coordinate in (w1,w2,w3) for b converted to c? (i.e. c=B’b) This is same as previous matrix composition by way of transforming to world coordinate

X axis vector Y axis vector Z axis vector

Intuitive Camera Specification

Not easy for user to pick up exact up vector!! So, we compute v automatically from up vector.

n a b n b’ b

n a b Another way ……………….. a = b’ x n b = n x a

v1=(1,0,0), v2=(0,1,0) and v3(0,0,1)

Note that matrix storage order is column major in OpenGL

u (i.e., x) axis n (i.e.,z) axis v (i.e., y) axis Treat yourself (viewer) as a airplane heading to –Zc Note that: as a viewer is moving, the object is moving in opposite direction on the viewing plane!!

This is z-like rotation

n v n’ v’ u n n’ u’ This is x-like rotation This is y-like rotation

How about pitch() and yaw()? Same stories as roll(). 7.3.1. Implementing pitch() and yaw(). void Camera :: pitch (float angle) { // pitch the camera through angle degrees around U float cs = cos(3.14159265/180 * angle); float sn = sin(3.14159265/180 * angle); Vector3 t(v); // remember old v v.set(cs*t.x + sn*n.x, cs*t.y + sn*n.y, cs*t.z + sn*n.z); n.set(-sn*t.x + cs*n.x, -sn*t.y + cs*n.y, -sn*t.z + cs*n.z); setModelViewMatrix(); } void Camera :: yaw (float angle) { // yaw the camera through angle degrees around V Vector3 t(n); // remember old v n.set(cs*t.x + sn*u.x, cs*t.y + sn*u.y, cs*t.z + sn*u.z); u.set(-sn*t.x + cs*u.x, -sn*t.y + cs*u.y, -sn*t.z + cs*u.z);

How about slide() Sliding a camera means to move it along one of its own axes-that is in the u,v,n direction-without rotating it. Along n means forward or backward Along u is left and right Along v is up and down Assume slide(delU, delV, delN)

Flythrough a Scene!!!