Chun-Yuan Lin Coordinate Reference Frames 2016/6/22 1 CG.

Slides:



Advertisements
Similar presentations
Computer Graphics- SCC 342
Advertisements

CMPE 466 COMPUTER GRAPHICS
Graphics Pipeline.
Three Dimensional Viewing
In the name of God Computer Graphics Bastanfard.
Shared Graphics Skills Cameras and Clipping Planes
Wigner-Seitz Cell The Wigner–Seitz cell around a lattice point is defined as the locus of points in space that are closer to that lattice point than to.
Polar Coordinates Objective: To look at a different way to plot points and create a graph.
PARAMETRIC EQUATIONS AND POLAR COORDINATES
Output Primitives Computer Graphics.
1 King ABDUL AZIZ University Faculty Of Computing and Information Technology CS 454 Computer graphics Two Dimensional Viewing Dr. Eng. Farag Elnagahy
PARAMETRIC EQUATIONS AND POLAR COORDINATES 9. Usually, we use Cartesian coordinates, which are directed distances from two perpendicular axes. Here, we.
IE433 CAD/CAM Computer Aided Design and Computer Aided Manufacturing Part-4 Computer Graphics- CAD Software Dr. Abdulrahman M. Al-Ahmari Industrial Engineering.
Graphics Output Primitives Pixel Addressing and Fill Area Dr. M. Al-Mulhem Feb. 1, 2008.
CMPE 466 COMPUTER GRAPHICS
Vectors and the Geometry of Space 9. 2 Announcement Wednesday September 24, Test Chapter 9 (mostly )
X y z Point can be viewed as intersection of surfaces called coordinate surfaces. Coordinate surfaces are selected from 3 different sets.
Circle Drawing algo..
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD3107 University of Palestine.
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
Geometric Objects Computer Graphics Lab. Sun-Jeong Kim.
Mathematics for Computer Graphics (Appendix A) Won-Ki Jeong.
POLAR COORDINATES (Ch )
Chapter 2: Fundamentals I. After completing this Chapter, you will be able to do the following: Construct Geometric Figures Use Coordinate Systems Additional.
Review of Vector Analysis
Chapter 3 Vectors Coordinate Systems Used to describe the position of a point in space Coordinate system consists of A fixed reference point called.
Copyright - Planchard 2012 History of Engineering Graphics Stephen H. Simmons TDR 200.
Dr. S.M. Malaek Assistant: M. Younesi
WHERE TO DRAW A LINE?? Line drawing is accomplished by calculating intermediate positions along the line path between specified end points. Precise definition.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
1 CMT Fundamentals of Computer Graphics Revision Dr. Xiaohong Gao BG---Room 2C23 Week 11.
Transformation of Graphics
Two-Dimensional Viewing
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.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
Two Dimensional Viewing
Geometric Transformations
Graphics Graphics Korea University Mathematics for Computer Graphics Graphics Laboratory Korea University.
Multiple Integrals 12.
Graphics Output Primitives
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Chapter 10 Rotational Motion.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 1 1.
Chun-Yuan Lin Mathematics for Computer Graphics 2015/12/15 1 CG.
Geometric Transformations
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Three-Dimensional Viewing
Three-Dimensional Viewing Hearn & Baker Chapter 7
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
GEOMETRY AND LINE GENERATION Geometry and Line Generation Chapter 2.
CS552: Computer Graphics Lecture 6: Viewing in 2D.
VECTORS AND THE GEOMETRY OF SPACE 10. VECTORS AND THE GEOMETRY OF SPACE In this chapter, we introduce vectors and coordinate systems for three-dimensional.
2/28/2016 CS 551 / 645: Introductory Computer Graphics Framebuffer Mathematical Foundations The Rendering Pipeline.
OUTPUT PRIMITIVES A.Aruna/Faculty of Information technology/SNSCE13/19/2016.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Write Bresenham’s algorithm for generation of line also indicate which raster locations would be chosen by Bresenham’s algorithm when scan converting.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
COORDINATE SYSTEMS & TRANSFORMATION
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Three Dimensional Viewing
Coordinate Reference Frames
Engineering Geometry Engineering geometry is the basic geometric elements and forms used in engineering design. Engineering and technical graphics are.
Line and Character Attributes 2-D Transformation
Three Dimensional Viewing
CSE 411 Computer Graphics Lecture #2 Mathematical Foundations
15.7 Triple Integrals.
Presentation transcript:

Chun-Yuan Lin Coordinate Reference Frames 2016/6/22 1 CG

Coordinate Representations (1) To generate a picture using a programming package, we first need to give the geometric descriptions of the objects that are to be displayed. These descriptions determine the locations and shapes of the objects. A box is specified by the positions of its corners (vertices) A sphere is defined by its center position and radius. With few exceptions, general graphics packages require geometric descriptions to be specified in a standard, right-hand, Cartesian- coordinate reference frame. 2016/6/22 CG 2

Coordinate Representations (2) If coordinate values for a picture are given in some other reference frame, they must to be converted to Cartesian-coordinate before they can be input to the graphics package. (other systems may be not) Several different Cartesian reference frames are used in the process of constructing and display a scene. We can define the shapes of individual objects, such as tree, within a separate coordinate reference frame for each objects. (Modeling coordinate)(local coordinates, master coordinates) Once the individual object shapes have been specified, we can construct “model” a scene by placing the objects into appropriate locations within a scene reference frame. (World coordinates) 2016/6/22 CG 3

Coordinate Representations (3) Geometric descriptions in modeling coordinates and world coordinates can be given in any convenient floating-pointing or integer values, with regard for the constrains of a particular output device. After all parts of a scene have been specified, the overall world coordinate description is processed through various routines onto one or more output-device reference frames for display. This process is called the viewing pipeline. World coordinate positions are first converted to viewing coordinates corresponding to the view we want of a scene, based on the position and orientation of a hypothetical camera. 2016/6/22 CG 4

Coordinate Representations (4) Then object locations are transformed to a two-dimensional projection of the scene, which corresponds to what we will see on the output device. The scene is then stored in normalized coordinates, which each coordinate value is in the range from -1 to 1 or in the range from 0 to 1. (normalize device coordinates) Finally, the picture is scan converted into the refresh buffer of a raster system for display. The coordinate systems for display devices are generally called device coordinates, or screen coordinates in the case of a video monitor. 2016/6/22 CG 5

Coordinate Representations (5) An initial modeling-coordinating position (x mc, y mc, z mc ) in this illustration is transferred to world coordinates, then to viewing and projection coordinates, then to left-handed normalized coordinates, and finally to a device-coordinate position (xdc, ydc) with the sequences: (x mc, y mc, z mc )  (x wc, y wc, z wc )  (x vc, y vc, z vc )  (x pc, y pc, z pc )  (x nc, y nc, z nc )  (x dc, y dc ) Device coordinates (x dc, y dc ) are integer within the range (0,0) to (x max, y max ) for a particular output device. 2016/6/22 CG 6

2016/6/22 CG 8 Variety of mathematical concepts and techniques are employed in computer-graphics algorithms. Both Cartesian and non-Cartesian reference frames are often useful in computer graphics applications. We typically specify coordinates in a graphics program using a Cartesian reference system, but the initial specification of a scene could be given in a non-Cartesian frame of reference.

Two-Dimensional Cartesian Screen Coordinates (1) 2016/6/22 CG 9 For the device-independent commands within a graphics package, screen-coordinate positions are referenced within the first quadrant of a two-dimensional Cartesian frame in standard position. The coordinate origin for this reference frame is at the lower-left screen corner. Scan line, however, are numbered from 0 at the top of the screen, so that screen positions are represented internally with respect to the upper-left corner of the screen.

Two-Dimensional Cartesian Screen Coordinates (2) 2016/6/22 CG 10 Therefore, device-dependent commands, such as those for interactive input and display window manipulations, often reference screen coordinates using the inverted Cartesian frame. x y x y Cartesian frame inverted Cartesian frame

Standard Two-Dimensional Cartesian Reference Frames 2016/6/22 CG 11 We use Cartesian systems in standard position for world-coordinate specifications, viewing coordinates, and other references within the two-dimensional viewing pipeline.

Polar Coordinates in the xy Plane (1) 2016/6/22 CG 12 A frequently used two-dimensional non-Cartesian system is a polar coordinate reference frame. Positive angular displacements are counterclockwise, and negative angular displacements are clockwise. The relation between Cartesian and polar coordinates is shown below. r θ P r θ x y

Polar Coordinates in the xy Plane (2) 2016/6/22 CG 13 We can transform from polar coordinates to Cartesian coordinates with the expressions. x = r cos θ, y = r sin θ The inverse transformation from Cartesian to polar coordinates is r =, θ = One radian is defined as a measure for an angle that is subtended by a circular arc that has length equal to the circle radius. θ = θ x r y P θ s r P

Standard Three-Dimensional Cartesian Reference Frames 2016/6/22 CG 14 Figure A-6(a) shows the conventional orientation for the coordinate axes in a three-dimensional Cartesian reference system. This is called a right-handed system. In most computer graphics programs, we specify object descriptions and other coordinate parameters in right-handed Cartesian coordinates. (assume that all Cartesian reference frames are right- handed unless specifically stated otherwise) Cartesian reference frames are orthogonal coordinate systems, which just means that the coordinate axes are perpendicular to each other. Also in Cartesian frames, the axes are straight lines.

Three-Dimensional Cartesian Screen Coordinates 2016/6/22 CG 16 When a view of a three-dimensional scene is displayed on a video monitor, depth information is stored for each screen position. The three-dimensional position corresponding to each screen point is often referenced with the left-handed system.

Three-Dimensional Curvilinear- Coordinate Systems (1) 2016/6/22 CG 18 Any non-Cartesian reference frame is referred to as a curvilinear- coordinate system. The choice of coordinate system for a particular graphics application depends on a number of factors, such as symmetry, ease of computation, and visualization advantages. Figure A-8 shows a general curvilinear-coordinate reference frame formed with three coordinate surfaces, where each surface has one coordinate held constant.

Three-Dimensional Curvilinear- Coordinate Systems (2) 2016/6/22 CG 20 A cylindrical-coordinate specification of a spatial position is shown in Fig. A-9 in relation to a Cartesian reference frame. We can transform from a cylindrical-coordinate specification to a Cartesian reference frame with the calculations. x = ρ cos θ, y = ρ sin θ, z = z

Three-Dimensional Curvilinear- Coordinate Systems (3) 2016/6/22 CG 22 Another commonly used curvilinear-coordinate specifications is the spherical-coordinate system in Fig. A-10. Spherical coordinates are sometimes referred to as polar coordinates in three-dimensional space. We can transform from a spherical-coordinate specification to a Cartesian reference frame with the calculations. x = r cos θ sin φ, y = r sin θ sin φ, z = r cos φ

Solid Angle 2016/6/22 CG 24 The definition for a solid angle ω is formulated by analogy with the definition for a two-dimensional radian-angle θ between two intersecting lines. The solid angle ω within the cone-shaped region with apex at P is defined as The total area of the spherical surface is 4 π r 2