12-Perspective Depth Assoc.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.

Slides:



Advertisements
Similar presentations
Learn to recognize, describe, and show transformations.
Advertisements

10. 3D Coordinate Operations Dr. Ahmet Zafer Şenalp Makine Mühendisliği Bölümü Gebze Yüksek Teknoloji.
Principles of Computer-Aided Design and Manufacturing Second Edition 2004 ISBN Author: Prof. Farid. Amirouche University of Illinois-Chicago.
Computer Graphics Lecture 8 Arbitrary Viewing II: More Projection, Clipping and Mathematics of 3D Viewing.
Three Dimensional Viewing
11. Wireframe Perspective Display Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department.
10. 3D Coordinate Operations Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze.
ME 521 Computer Aided Design Assoc.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze.
8. 2D Coordinate Operations Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze.
PLANE STRESS TRANSFORMATION
COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length.
CS 376 Introduction to Computer Graphics 02 / 26 / 2007 Instructor: Michael Eckmann.
The Pinhole Camera Model
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
UNIT - 5 3D transformation and viewing. 3D Point  We will consider points as column vectors. Thus, a typical point with coordinates (x, y, z) is represented.
CS 325 Introduction to Computer Graphics 03 / 03 / 2010 Instructor: Michael Eckmann.
ME 2304: 3D Geometry & Vector Calculus Dr. Faraz Junejo Double Integrals.
ME 520 Fundamentals of Finite Element Analysis
Image Formation. We will use geometrical optics: light propagates in straight lines until its direction is changed by reflection or refraction. When we.
7-Bar Elements in 3-D Space Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
CS 325 Introduction to Computer Graphics 03 / 08 / 2010 Instructor: Michael Eckmann.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
Geometric Models & Camera Calibration
Translations, Reflections, and Rotations
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
6-Bar Elements in 2-D Space Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 13,14: Reviews Transforms, OpenGL
TransformationsTrianglesLinesAnglesGrab Bag $100 $200 $300 $400 $500 Final Jeopardy $100 $200 $300 $400 $500 $100 $200 $300 $400 $500 $100 $200 $300.
10-Beam Elements in 2-D Space (Plane Frame Element) Dr. Ahmet Zafer Şenalp Mechanical Engineering.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Programming 3D Applications CE Displaying Computer Graphics Week 3 Lecture 5 Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.
CS 450: COMPUTER GRAPHICS PROJECTIONS SPRING 2015 DR. MICHAEL J. REALE.
Basic Perspective Projection Watt Section 5.2, some typos Define a focal distance, d, and shift the origin to be at that distance (note d is negative)
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
13. The Ideal Work Method for the Analysis of Forming Processes
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
11. Plastic Anisotropy Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
Computer vision: models, learning and inference M Ahad Multiple Cameras
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Week 4 Functions and Graphs. Objectives At the end of this session, you will be able to: Define and compute slope of a line. Write the point-slope equation.
Determining 3D Structure and Motion of Man-made Objects from Corners.
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
MOHR'S CIRCLE The formulas developed in the preceding article may be used for any case of plane stress. A visual interpretation of them, devised by the.
Unit 10 Transformations. Lesson 10.1 Dilations Lesson 10.1 Objectives Define transformation (G3.1.1) Differentiate between types of transformations (G3.1.2)
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
6. Strain Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical University.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
CS5500 Computer Graphics March 20, Computer Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts.
6.1 Areas Between Curves In this section we learn about: Using integrals to find areas of regions that lie between the graphs of two functions. APPLICATIONS.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Computer Graphics Lecture 19 PROJECTIONS I Taqdees A. Siddiqi
Viewing in 3D Lecture 11. Viewing in 3D2 u The 3D viewing process is inherently more complex than is the 2D viewing process. F In 2D, we simply specify.
1 CHAPTER 2C- Mohr’s Circle Dr. Zuhailawati Hussain EBB 334 Mechanical Metallurgy.
Coordinate Transformations
Geometric Transformations
11. Viewing Transformations
13. Wireframe Perspective Display
CSCE 441 Computer Graphics 3-D Viewing
9. Methods of Determining Work Hardening Characteristics
Viewing in 3D Chapter 6.
CENG 477 Introduction to Computer Graphics
12. 3D Coordinate Operations
Viewing Transformations
Computer Graphics Lecture 20
Chapter V Vertex Processing
Licensed Electrical & Mechanical Engineer
Presentation transcript:

12-Perspective Depth Assoc.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical University ME 521 Computer Aided Design

12-Perspective Depth Operation of removing hidden lines or surfaces require perspective transformations with special properties. Depth of each point in the perspective image must be available for making decisions about hidden lines and surfaces. The screen coordinate system in increased to 3-D: x s y s increased to z s. z s will be calculated to find the depth information without altering the interpretation of x s, y s values. Images of P and Q are identical (x s, y s ). depth of P=0.3 depth of Q=0.6 Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU Introduction

We need to calculate the depth of a line not only at end points but also at any intermediate point for the purposes of hidden line algorithm. We remember the fact that straight lines and planes in the eye coordinate system, transform into straight lines and planes respectively in the screen coordinate system. Using the plane equations (plane eqn. in eye coordinates transform into plane eqn. in screen coord.): a x e +b y e +c z e + d = 0 a' x s +b' y s +c' z s + d' = 0 As shown before: Assuming D/S=1, V sx =V s y=1, V cx =V xy =0 for given values of x s and y s from the plane equation, will satisfy the plane equation.  or  can be arbitrary, however  < 0 gives a better intuitive notion such that if z e is larger, z s is also larger.  &  can be chosen to increase the depth precision. Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

If depth resolution can be maximized so that z e =D then z e =D maps into smallest z s, z e =D magnifies into largest z s for z s convention is adopted: Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

These connections modify the viewing pyramid by adding plans to limit the z e values as shown. Here; These can be transformed to hardware coordinates by viewpoint transformation The perspective transformation are now: Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

w is related to depth. point lying on plane of viewpoint w=0, w > 0 lie in front, w < 0 lie in behind. w can be regarded as a fourth coordinate. These equations can also be represented in matrix form:, Clipping must be performed before the above equation. Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

Clipping algorithm similar to those discussed before is used, The point of intersection on a line with a plane x = -w is calculated by: t is the distance along the line; t = 0 at x 1, t = 1 at x 2. At intersection, x = t (x 2 - x 1 ) + x 1 Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

Properties of The Screen Coordinate System The viewpoint z e = 0 is undefined in the screen coordinates, but can be imagined as being at infinity along -z s. Thus rays emanating from the eye are all parallel to the z s axis. Figure shows that Q hides P. Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

Properties of The Screen Coordinate System Procedure: We compare z s coordinates of P (z s =  ) and the intersection of a line from P to the viewpoint with plane Q ( z s = z d ) if plane equation of Q is known in the screen coordinate system. a x s + b y s + c z s + d = 0 Substituting x s = , y s =  solve for z d. Here all rays are parallel, in eye coordinates the same calculations are more difficult. Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

Example: Perspective of a cube Consider a cube centered at the origin of the world coordinate system, defined by the following points and lines: Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

Example : Five steps in establishing the viewing transformation: a)translation, b)rotation about the x axis, c)rotation about the y axis, d)rotation about the x axis, e)inverting the z axis We shall observe this cube from a point (6, 8, 7.5), with the viewing axis z e pointed directly at the origin of the world coordinate system. There is still one degree of freedom left, namely an arbitrary rotation about the z e axis: we shall assume that the x e axis lies in the z = 7.5 plane. The viewing transformation is established by a sequence of changes of coordinate systems. Recall that a transformation that moves a coordinate system is the inverse of the corresponding transformation that moves points. Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth 1.The coordinate system is translated to (6, 8, 7.5), as shown in the figure a. The point(6, 8, 7.5) in the original coordinate systems becomes the origin: 2.Rotate the coordinate system about the x' axis by 90°, as shown in figure b. Because we require the inverse transformation, we substitute  =-90° into equation:

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth 3.Rotate about the y' axis by an angle so that the point (0, 0, 7.5) will lie on the z' axis, as shown in figure c. We have using triangle: As inverse transform is required  = ° is used: 4. - Rotate about the x' axis by an angle so that the origin of the original coordinate system will lie on the z' axis, as shown in figure d. AS shown in figure d the angle is calculated from triangle: As inverse transform is required  = 36.87° is used:

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth 5. Finally, reverse the sense of the z' axis in order to create a left-handed coordinate system that conforms to the conventions of the eye coordinate system, as shown in figure e. A scaling matrix is used: This completes the five primitive transformations needed to establish the viewing transformation V=T 5 T 4 T 3 T 2 T 1

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth Suppose that we wish to fill a 30 by 30 centimeter display screen, designed to be viewed from 60 centimeters away, and that the coordinate system of the screen runs from 0 to Thus, D=60, S=15, and V sx =V cx =V sy =V cy =1023/2. D=60, S=15, V sx =V cx =V sy =V cy =1023/2 The transformation is therefore: To calculate the screen coordinates: x s = (x c /z c ) , y s = (y c /z c )

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth Total transformation matrix= NV= NT 5 T 4 T 3 T 2 T 1 or: Each vertex of the cube is transformed by the matrix NV, clipped, and converted to screen coordinates using equation (x c =NVx, y c =NVy, z c =NVz) xcxc ycyc zczc A B C D E F G H

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth Although the clipping routine must be applied to each line in the cube, it is apparently from the table that all of the vertices lie within the viewing pyramid, and the clipping algorithm will trivially accept each line. The screen coordinates of the line endpoints are calculated with the below equation x s = (x c /z c ) , y s = (y c /z c )

Example : Dr. Ahmet Zafer Şenalp ME Mechanical Engineering Department, GTU 12-Perspective Depth The lines are drawn as shown in the below figure.