Computational Biology, Part E Basic Principles of Computer Graphics Robert F. Murphy Copyright  1996, 1999, 2000, 2001. All rights reserved.

Slides:



Advertisements
Similar presentations
Chapter 4 Systems of Linear Equations; Matrices
Advertisements

Chapter 4 Systems of Linear Equations; Matrices
Chapter 4 Systems of Linear Equations; Matrices
Chapter 4 Systems of Linear Equations; Matrices Section 2 Systems of Linear Equations and Augmented Matrics.
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
CS 376 Introduction to Computer Graphics 02 / 09 / 2007 Instructor: Michael Eckmann.
Outline for Today More math… Finish linear algebra: Matrix composition
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Linear Systems and Matrices
Graphics Programming Graphics Programming: Transformations.
HAWKES LEARNING SYSTEMS math courseware specialists Copyright © 2011 Hawkes Learning Systems. All rights reserved. Hawkes Learning Systems College Algebra.
MATH – High School Common Core Vs Kansas Standards.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1. Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Systems of Equations CHAPTER 9.1Solving Systems of Linear Equations Graphically.
1 1.1 © 2012 Pearson Education, Inc. Linear Equations in Linear Algebra SYSTEMS OF LINEAR EQUATIONS.
Mathematical Fundamentals
MATRICES AND DETERMINANTS
Copyright © Cengage Learning. All rights reserved.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Review for Chapter 4 Important Terms, Symbols, Concepts 4.1. Systems of Linear Equations in Two Variables.
Matrices King Saud University. If m and n are positive integers, then an m  n matrix is a rectangular array in which each entry a ij of the matrix is.
Copyright © Cengage Learning. All rights reserved. 7.4 Matrices and Systems of Equations.
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Computer Graphics World, View and Projection Matrices CO2409 Computer Graphics Week 8.
Computational Biology, Part 12 Spreadsheet Basics I Robert F. Murphy Copyright  1996, All rights reserved.
8 th Grade Math Common Core Standards. The Number System 8.NS Know that there are numbers that are not rational, and approximate them by rational numbers.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
GRAPHICS MODULE 14 STUDY BOOK. Graphic commands SCREEN - puts the screen into graphics mode WINDOW - allows scaling of the screen LINE - 3 formats –LINE.
Slide Copyright © 2009 Pearson Education, Inc. 7.3 Matrices.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
Computer Graphics, KKU. Lecture 41 The Computer Programming Laws Any given program, when running, is obsolete. Any given program costs more and.
Chapter 1 Systems of Linear Equations Linear Algebra.
Arab Open University Faculty of Computer Studies M132: Linear Algebra
Matrices Digital Lesson. Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 2 A matrix is a rectangular array of real numbers. Each entry.
Computer Graphics Matrices
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
Slide Copyright © 2009 Pearson Education, Inc. 7.4 Solving Systems of Equations by Using Matrices.
EEE 242 Computer Tools for Electrical Engineering
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Digital Image Processing CCS331 Camera Model and Imaging Geometry 1.
Linear Equations in Linear Algebra
Chapter 4 Systems of Linear Equations; Matrices
Gaussian Elimination and Gauss-Jordan Elimination
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Math Fundamentals Maths revisit.
Matrices Rules & Operations.
Linear Equations by Dr. Shorouk Ossama.
Geometric Transformations Hearn & Baker Chapter 5
Computer Graphics CC416 Week 15 3D Graphics.
Copyright © Cengage Learning. All rights reserved.
2D Viewing Pipeline.
Matrices and Systems of Equations 8.1
Matrix Operations SpringSemester 2017.
COMP 175: Computer Graphics February 9, 2016
2.1 Graphs of equations.
Chapter 4 Systems of Linear Equations; Matrices
Simultaneous Equations
with Applications in Computer Graphics
Chapter 4 Systems of Linear Equations; Matrices
Window to Viewport Transformations
Linear Equations in Linear Algebra
Chapter 4 Systems of Linear Equations; Matrices
1.8 Matrices.
Matrix Operations SpringSemester 2017.
1.8 Matrices.
Presentation transcript:

Computational Biology, Part E Basic Principles of Computer Graphics Robert F. Murphy Copyright  1996, 1999, 2000, All rights reserved.

2D Coordinate Systems Basic 2D Graphics Goal: Display an object or a set of objects which are defined in some coordinate system specified by the user using the coordinate system of a graphics device Basic 2D Graphics Goal: Display an object or a set of objects which are defined in some coordinate system specified by the user using the coordinate system of a graphics device  user coordinates may or may not correspond to “real world” coordinates  geographical map - yes  stock prices vs. time - no

2D Coordinate Model World Coordinate Plane Device Coordinate Plane

“World” or “User” Coordinates Units may be anything and may be different for x and y Units may be anything and may be different for x and y Three equivalent methods to describe the coordinates of an object Three equivalent methods to describe the coordinates of an object  Absolute x,y values (“absolute” coordinates)  Relative to object origin (“local” coordinates)  Relative to previous position (“relative” coordinates)

“World” or “User” Coordinates 3,1 4,2 5,1 Absolute * 1,1 1,-1 Relative * 1,1 2,0 Local * 1st coordinates must be absolute

“Physical” or “Device” Coordinates Different for each device Different for each device Units are some measure of actual distance (such as pixels, inches, etc.) and are normally the same for x and y Units are some measure of actual distance (such as pixels, inches, etc.) and are normally the same for x and y

Windows and Viewports Output devices such as monitors have finite sizes, so we cannot visualize entire plane Output devices such as monitors have finite sizes, so we cannot visualize entire plane  We define a viewport as a rectangular portion of the World we wish to see We may also wish to use only a portion of our output device to display a graph We may also wish to use only a portion of our output device to display a graph  We define a window as a rectangular portion of the Device we wish to use

Windows and Viewports World Coordinate Plane Device Coordinate Plane Viewport Window

Windows and Viewports Note that many differents terminologies are used for these concepts and that window and viewport as used here are reversed from the way they are used in many computer graphics texts Note that many differents terminologies are used for these concepts and that window and viewport as used here are reversed from the way they are used in many computer graphics texts

Windows and Viewports 4 values (x & y coordinates of two points) required to specify viewport 4 values (x & y coordinates of two points) required to specify viewport  e.g., positions of lower left and upper right corners 4 values (x & y coordinates of two points) required to specify window 4 values (x & y coordinates of two points) required to specify window These 8 values define a unique transformation from World to Device coordinates These 8 values define a unique transformation from World to Device coordinates

The Basic Linear Transformation We can convert from World (unprimed) to Device (primed) coordinates using the following equations: We can convert from World (unprimed) to Device (primed) coordinates using the following equations:

The Basic Linear Transformation We can convert these equations to the form We can convert these equations to the form These equations simultaneously scale and translocate These equations simultaneously scale and translocate

The Basic Linear Transformation (Demonstration C1, Part 1) (Demonstration C1, Part 1)

Transformation matrices Can use matrix notation to simplify description of calculations Can use matrix notation to simplify description of calculations Goal: Be able to use a single transformation matrix to convert fromWorld to Device coordinates Goal: Be able to use a single transformation matrix to convert fromWorld to Device coordinates Problem: Scaling requires multiplication, translocation requires addition Problem: Scaling requires multiplication, translocation requires addition Solution: Use homogeneous coordinates Solution: Use homogeneous coordinates

Transformation matrices Homogeneous coordinates: Add an extra coordinate to both World and Device coordinates Homogeneous coordinates: Add an extra coordinate to both World and Device coordinates Translation, scaling and rotation can now be done with a single matrix (set w=1) Translation, scaling and rotation can now be done with a single matrix (set w=1)

Transformation Matrices Translation (Displacement) Translation (Displacement)

Transformation Matrices Scaling Scaling

Transformation Matrices Rotation about x axis Rotation about x axis

Transformation Matrices Rotation about origin Rotation about origin

Transformation matrices Net transformation can be obtained by multiplying matrices Net transformation can be obtained by multiplying matrices Transformation matrices can be implemented in display hardware for dramatic speed improvement Transformation matrices can be implemented in display hardware for dramatic speed improvement When not implemented in hardware, tradeoff increased cost for matrix computation vs. ease in manipulation When not implemented in hardware, tradeoff increased cost for matrix computation vs. ease in manipulation

Transformation Matrices (Demonstration C1, Part 2) (Demonstration C1, Part 2)

Non-linear transformations Transformations such as logarithms can be implemented using run-time computation or precomputed lookup tables Transformations such as logarithms can be implemented using run-time computation or precomputed lookup tables

Graphing Data in Excel Since all graphs on our monitor are two- dimensional, how can we graph data for a single variable (where does the other dimension come from)? Since all graphs on our monitor are two- dimensional, how can we graph data for a single variable (where does the other dimension come from)?  When only one variable is available, Excel “creates” a variable called the category. It then plots the original variable versus the category. By default, the category consists of the numbers starting from 1 and incrementing by 1.

Graphing Data in Excel Types of graphs that require only one row or column of data (categorical graphs) Types of graphs that require only one row or column of data (categorical graphs)  Area, Line, 3D Area, 3D Line  Bar, Column, 3D Bar, 3D Column  Pie, Doughnut, Radar, 3D Pie  (3rd dimension for the 3D plots has depth of 1) If more than one row or column of data is provided, additional lines, bars, etc. are created If more than one row or column of data is provided, additional lines, bars, etc. are created

Graphing Data in Excel Types of graphs requiring two or more rows or columns of data (correlated or XYgraphs) Types of graphs requiring two or more rows or columns of data (correlated or XYgraphs)  XY (scatter)  If XY graph is selected but only one row or column of data are present, categorical values are generated and plot becomes equivalent to a Line graph  3D surface

Graphing Data in Excel (Demonstration C2) (Demonstration C2)

Graphing Data in Excel Graphing Tip: When values to be plotted are not present in conveniently adjacent cells, data can be “collected” using references to cells containing original data Graphing Tip: When values to be plotted are not present in conveniently adjacent cells, data can be “collected” using references to cells containing original data