Math of Projections:Overview. Perspective Viewing. Perspective Projections. Perspective Projections. Math of perspective projection

Similar documents
Line numbering and synchronization in digital HDTV systems

Working with PlasmaWipe Effects

NIIT Logotype YOU MUST NEVER CREATE A NIIT LOGOTYPE THROUGH ANY SOFTWARE OR COMPUTER. THIS LOGO HAS BEEN DRAWN SPECIALLY.

Polychrome Devices Reference Manual

Forces: Calculating Them, and Using Them Shobhana Narasimhan JNCASR, Bangalore, India

T-25e, T-39 & T-66. G657 fibres and how to splice them. TA036DO th June 2011

Logistics We are here. If you cannot login to MarkUs, me your UTORID and name.

Motivation. Analysis-and-manipulation approach to pitch and duration of musical instrument sounds without distorting timbral characteristics

Apollo 360 Map Display User s Guide

PROJECTOR SFX SUFA-X. Properties. Specifications. Application. Tel

2 Specialty Application Photoelectric Sensors

Music Scope Headphones: Natural User Interface for Selection of Music

PROBABILITY AND STATISTICS Vol. I - Ergodic Properties of Stationary, Markov, and Regenerative Processes - Karl Grill

Mullard INDUCTOR POT CORE EQUIVALENTS LIST. Mullard Limited, Mullard House, Torrington Place, London Wel 7HD. Telephone:

TOWARDS AN AUDITORY REPRESENTATION OF COMPLEXITY

Manual Comfort Air Curtain

2 Specialty Application Photoelectric Sensors

Using a Computer Screen as a Whiteboard while Recording the Lecture as a Sound Movie

BesTrans AOC (Active Optical Cable) Spec and Manual

ROUNDNESS EVALUATION BY GENETIC ALGORITHMS

Objectives: Topics covered: Basic terminology Important Definitions Display Processor Raster and Vector Graphics Coordinate Systems Graphics Standards

DIGITAL DISPLAY SOLUTION REAL ESTATE POINTS OF SALE (POS)

Analyzing the influence of pitch quantization and note segmentation on singing voice alignment in the context of audio-based Query-by-Humming

EE260: Digital Design, Spring /3/18. n Combinational Logic: n Output depends only on current input. n Require cascading of many structures

Part 1: Introduction to computer graphics 1. Describe Each of the following: a. Computer Graphics. b. Computer Graphics API. c. CG s can be used in

Computer Graphics: Overview of Graphics Systems

PowerStrip Automatic Cut & Strip Machine

CODE GENERATION FOR WIDEBAND CDMA

DCT 1000 Cable Terminal Installation Manual

Chapter 7 Registers and Register Transfers

Organic Macromolecules and the Genetic Code A cell is mostly water.

Manual Industrial air curtain

Image Intensifier Reference Manual

SMARTEYE ColorWise TM. Specialty Application Photoelectric Sensors. True Color Sensor 2-65

Module 3: Video Sampling Lecture 16: Sampling of video in two dimensions: Progressive vs Interlaced scans. The Lecture Contains:

References and quotations

Energy-Efficient FPGA-Based Parallel Quasi-Stochastic Computing

NewBlot PVDF 5X Stripping Buffer

9311 EN. DIGIFORCE X/Y monitoring. For monitoring press-fit, joining, rivet and caulking operations Series 9311 ±10V DMS.

KRAMER ELECTRONICS LTD. USER MANUAL

2.4.1 Graphics. Graphics Principles: Example Screen Format IMAGE REPRESNTATION

FHD inch Widescreen LCD Monitor USERGUIDE

CRAYON. The crayons for the digital generation

Minimum Span. Maximum Span Setting

ttco.com

8825E/8825R/8830E/8831E SERIES

COMMITTEE ON THE HISTORY OF THE FEDERAL RESERVE SYSTEM. Register of Papers CHARLES SUMNER HAMLIM ( )

Part 1: Introduction to Computer Graphics

Application Example. HD Hanna. Firewire. Display. Display. Display. Display. Display. Computer DVD. Game Console. RS-232 Control.

MOBILVIDEO: A Framework for Self-Manipulating Video Streams

Displays. History. Cathode ray tubes (CRTs) Modern graphics systems. CSE 457, Autumn 2003 Graphics. » Whirlwind Computer - MIT, 1950

COLLEGE READINESS STANDARDS

Image Enhancement in the JPEG Domain for People with Vision Impairment

THE Internet of Things (IoT) is likely to be incorporated

Sigma 3-30KS Sigma 3-30KHS

CS2401-COMPUTER GRAPHICS QUESTION BANK

viewing perspective projection in drawing

Linguistic Stereotyping in Hollywood Cinema

Quality improvement in measurement channel including of ADC under operation conditions

PHI 5000 VersaProbe TM Operator s Guide

RELIABILITY EVALUATION OF REPAIRABLE COMPLEX SYSTEMS AN ANALYZING FAILURE DATA

STEEL BOXES & COVERS

Guide to condition reports for domestic electrical installations

Dektak Step by Step Instructions:

Setup Guide. EIZO Monitors. Rev. 1.4

2 Specialty Application Photoelectric Sensors

Manual RCA-1. Item no fold RailCom display. tams elektronik. n n n

Manual WIB Carriage lighting Colour of lighting: warm white. Item no tams elektronik. tams elektronik n n n

The Communication Method of Distance Education System and Sound Control Characteristics

Module 1: Digital Video Signal Processing Lecture 3: Characterisation of Video raster, Parameters of Analog TV systems, Signal bandwidth

Part II: Derivation of the rules of voice-leading. The Goal. Some Abbreviations

Video Cassette Recorder

RHYTHM TRANSCRIPTION OF POLYPHONIC MIDI PERFORMANCES BASED ON A MERGED-OUTPUT HMM FOR MULTIPLE VOICES

Setting Up the Warp System File: Warp Theater Set-up.doc 25 MAY 04

Higher-order modulation is indispensable in mobile, satellite,

VISUAL IDENTITY STYLE GUIDE ALUMNI ASSOCIATION CHAPTERS

Volume 20, Number 2, June 2014 Copyright 2014 Society for Music Theory

A Backlight Optimization Scheme for Video Playback on Mobile Devices

Recognition of Human Speech using q-bernstein Polynomials

SUPREME COURT OF THE STATE OF CALIFORNIA THE PEOPLE OF THE STATE OF CALIFORNIA,.) Plaintiff-Respondent~ Defendant-Appellant.

MODELLING PERCEPTION OF SPEED IN MUSIC AUDIO

The Blizzard Challenge 2014

A Simulation Experiment on a Built-In Self Test Equipped with Pseudorandom Test Pattern Generator and Multi-Input Shift Register (MISR)

2 Specialty Application Photoelectric Sensors

Research on the Classification Algorithms for the Classical Poetry Artistic Conception based on Feature Clustering Methodology. Jin-feng LIANG 1, a

Twin City Fan & Blower

Read Only Memory (ROM)

3. Displays and framebuffers

NexLine AD Power Line Adaptor INSTALLATION AND OPERATION MANUAL. Westinghouse Security Electronics an ISO 9001 certified company

7thSense Design Delta Media Server

Tobacco Range. Biaxially Oriented Polypropylene Films and Labels. use our imagination...

Background Manuscript Music Data Results... sort of Acknowledgments. Suite, Suite Phylogenetics. Michael Charleston and Zoltán Szabó

Table of content. Table of content Introduction Concepts Hardware setup...4

Warranty Registration System Help us to serve you better by registering your product for Warranty

Debugging Agent Interactions: a Case Study

Mathematics and Beauty

Internet supported Analysis of MPEG Compressed Newsfeeds

TABLE OF CONTENTS. General Specifications...4 Crimp Contact Information...4

FOURSQUARE BRAND GUIDE LOGO USAGE. Brand Guide FALL 2014

What Does it Take to Build a Complete Test Flow for 3-D IC?

Transcription:

Math of Projectios:Overview Math of perspective projectio, stadard cofiguratio OpeGL perspective projectios Math of orthographic projectio OpeGL orthographic projectios Viewport trasformatios ad settig them i OpeGL Perspective Viewig Viewig trasformatios Orthographic projectio caoical viewig volume Perspective projectio caoical viewig volume Hidde surface removal Viewig, projectios Hofstra Uiversity 3 Viewig, projectios Perspective Projectios -z Viewig, projectios The graphics system applies a 4 x 4 projectio matrix after the model-view matrix Gearal perspective: Viewig directio is ot orthogoal to projectio plae Hofstra Uiversity 33 Viewig, projectios Math of perspective projectio Let O be COP Projectio plae has equatio z=d, d < 3D poit P has homogeeous coordiates (x,y,z,) It is mapped to poit Q (xp,yp,d) i the projectio plae Hofstra Uiversity 34 Stadard cofiguratio: COP=VRP Projectio plae is orthogoal to z-axis, at z=d Viewig, projectios Hofstra Uiversity Math of perspective projectio The discussio here is carried out with respect to the camera (view) referece frame, (VRP,u,v,) The projectio trasformatio maps 3D poits to D poits i the projectio plae Stadard cofiguratio: 3 Perspective Projectios -z Viewig directio orthogoal To projectio plae Hofstra Uiversity 35 Q is o the segmet PO, thus Q=cP+(-c)O, where <c< Thus, xp = c.x, yp = c.y, d = c.z è c = d/z Thus, xp = (d/z).x, yp = (d/z).y, i affie coordiates Note that projectio is ot liear i affie coordates. Viewig, projectios Hofstra Uiversity 36

Math of perspective projectio Clippig P=p(x,y,z,) è Q=q(d.x/z, d.y/z, d, ), i homogeeous coordiates. Perspective projectio is ot liear i affie coord. Perspective projectio is liear i homogeeous M per = / d q = M per p = / d x x y y = z z z / d From homogeeous to affie coordiates: (a,b,c,w) è (a/w, b/w,c/w) Thus (x,y,z,d/z) i homogeeous becomes (x/(z/d), y/(z/d),d,) ==> (d.x/z, d.y/z,) i proj. plae Viewig, projectios Hofstra Uiversity 37 Object parts outside of the of the view volume are clipped First we will discuss the opegl fuctios that set up the projectio trasformatios Next we will discuss the viewport trasformatio ad settig the viewport i OpeGL Last, we will go back to projectio, ad see how the graphics systems carry out efficietly the more geeral perspective projectio by reducig it to the stadard perspective, ad the to the caoical orthographic You ca set up ay projectio you wat (parallel or perspective) by settig up the the projectio matrix directly Although, more ofte we use affie trasformatios to reduce more geeral projectios to the caoical oes Viewig, projectios Hofstra Uiversity 38 Perspective Viewig i OpeGL Projectios i OpeGL frustum Depth of projectio plae (size of clippig widow) iside the pyramid does ot matter. All that matters is object size relative to the widow. The projectio plae depth does ot affect relative size. Thus i CG systems usually far or ear plae is selected to be the projectio plae. Near i opegl. opegl. Viewig, projectios Hofstra Uiversity 39 oly fixed poit Objects ot i the view volume are clipped. View (projectio) plae is frot clippig plae. Viewig, projectios OpeGL Perspective Hofstra Uiversity 4 OpeGL Perspective glfrustum(left, glfrustum(left, right, bottom, top, ear, far); gluperspective( gluperspective(fovy, fovy, aspect, ear, far); glmatrixmode(gl_projection); glloadidetity( ); fov is the agle betwee the top ad bottom plaes glfrustum(left, right, bottom, top, ear, far); The relatioship betwee frot(ear) plae ad COP(origi) defie the steepess of the frustum Viewig, projectios Hofstra Uiversity 4 Viewig, projectios Hofstra Uiversity 4

OpeGL Orthographic Projectio Stadard Orthographic Projectio glortho(left, right, bottom, top, ear, far); x p y p = z p x y z Viewig, projectios Hofstra Uiversity 43 Viewig, projectios Hofstra Uiversity 44 Viewport Trasformatio Viewport Trasformatio viewport trasformatio correspods to the stage where the size of the developed photograph is chose The viewport is measured i pixels, i scree widow coordiates, which reflect the positio of pixels o the scree relative to the lower left corer of the widow vertices outside the viewig volume have bee clipped viewport is the rectagular regio of the widow where the image is draw Viewig, projectios Hofstra Uiversity 45 Viewig, projectios Hofstra Uiversity 46 Defiig the Viewport The widow maager, ot OpeGL, is resposible for opeig a widow o the scree By default the viewport is set to the etire pixel rectagle of the widow that's opeed Use the glviewport() commad to choose a smaller drawig regio Defiig The Viewport By default, the iitial viewport parameters are (,, wiwidth, wiheight), where wiwidth ad wiheight are the widow dimesios. The aspect ratio of a viewport should geerally equal the aspect ratio of the viewig volume If the two ratios are differet, the projected image will be distorted as it's mapped to the viewport void glviewport(glit x, GLit y, GLsizei width, GLsizei height); lower left corer size of viewport rectagle Viewig, projectios Hofstra Uiversity 47 Viewig, projectios Hofstra Uiversity 48 3

Viewport Distortio World to View coordiates Camera positio: VRP Viewig trasformatio Traslate VRP to origi: T(-VRP) Rotate, aligig view frame (u,v,) with world frame The composite trasformatio R.T will have the effect of trasformig the coordiates of vertices from world to view coordiates Viewig, projectios Hofstra Uiversity 49 Viewig, projectios Hofstra Uiversity 5 Caoical view orthographic projectio VRP at the origi Lookig i egative z directio (COP does ot matter) View-up vector is (,,) View volume is a cube of side ceter at origi, (left, right, bottom, top, ear, far)=(-,,-,,,-) Perspective projectio stadard viewig VRP at origi Lookig i egative z-directio, look at is (,,-) COP coicides with VRP, viewig directio is orthogoal to view plae View-up vector is (,,) View volume is a regular frustum (left, right, top, bottom, ear, far)=(-,,-,,,z_far), The ear plae is at, the far is at -z. Side clippig plaes make 45 deg agles with z axis (,,-) Viewig, projectios (-,-,) Hofstra Uiversity 5 Viewig, projectios Hofstra Uiversity 5 Caoical Viewig for Perspective Hidde Surface Removal z-buffer algorithm as the polygos are rasterized we keep track of the distace from the VRP to the closest poit o each projector. We display oly the closest poit Requires a depth or z buffer to store the ecessary depth iformatio Viewig, projectios Hofstra Uiversity 53 glutiitdisplaymode(glut_double GLUT_RGB GLUT_DEPTH); gleable(gl_depth_test); glclear(gl_color_buffer_bit GL_DEPTH_BUFFER_BIT); Viewig, projectios Hofstra Uiversity 54 4

Hidde Surface Removal Perspective Normalizatio Display oly visible surfaces (remove hidde) Paiter s algorithm: sort polygos accordig to z, project i order of decreasig depth Pixel based: back track rays from pixels to first itersectio How ca we apply geeral perspective projectio? Derive the perspective projectio matrix (geeral 4x4 matrix), load that as a PROJECTION matrix Trick: Usig series of affie trasformatios to alter the world, so that the image of the distorted world uder stadard (caoical) projectio is the same as the image of the udistorted world uder the origial geeral projectio Graphics systems go eve farther: perspective projectios are implemeted iterally as orthographic projectios (of the distorted world) with respect to the caoical view volume (xx cube). This way the clippig is very efficiet, ad z-buffer algorithm is supported by preservig relative depth i the process of trasformig objects. Z-buffer algorithm: based o relative depth after projectio Viewig, projectios Hofstra Uiversity 55 Viewig, projectios Hofstra Uiversity 56 Projectio Normalizatio Idea Projectio Normalizatio The distortio is described by a homogeeouscoordiate matrix Cocateate this matrix with a orthogoalprojectio matrix to yield a resultig projectio matrix Viewig, projectios Hofstra Uiversity 57 Viewig, projectios Hofstra Uiversity 58 Geeral Perspective Projectio Projectio coverts poits i 3-D space to poits o the projectio plae Three steps (the graphics system implemets them): Coverts the viewig volume (geeral frustum) to the caoical perspective view volume Next coverts the caoical perspective view volume to the caoical orthographic view volume Applys orthographic projectio matrix The most caoical view volume Orthographic projectio with respect to most caoical view volume Caoical view volume is a xx cube whose ceter is at the origi (default view volume) How to clip?: simple How to project?: o divisio (,,-) (-,-,) Viewig, projectios Hofstra Uiversity 59 Viewig, projectios Hofstra Uiversity 6 5

Geeral Orthogoal Projectio glmatrixmode(gl_projection); glloadidetity( ); glortho(-.,., -.,., -.,.); Projectio Matrix determie which objects are clipped out P = ST x = max x mi max y y mi zmax z mi xmax + x xmax x ymax + y ymax y zmax + z zmax z mi mi mi mi mi mi Projectio Matrix maps a view volume to the caoical view volume Viewig, projectios Hofstra Uiversity 6 Viewig, projectios Hofstra Uiversity 6 Oblique Projectio Oblique Projectio degree of obliqueess shearig Viewig, projectios Hofstra Uiversity 63 Viewig, projectios Hofstra Uiversity 64 Perspective Projectio Matrices Perspective Projectio Matrices Look for a trasformatio allows a simple caoical projectio by distortig the vertices of a object Three steps: ) select caoical viewig volume, ) itroduce the perspective ormalizatio trasformatio ad 3) derive the perspective projectio matrix Viewig, projectios Hofstra Uiversity 65 Viewig, projectios Hofstra Uiversity 66 6

Perspective Projectio Matrices N is called the perspective ormalizatio matrix. It coverts a perspective projectio to a orthogoal projectio N Projectio ad Shadows Shadows are ot geometric objects but importat for realism A poit is i a shadow if it is ot illumiated by ay light source A shadow polygo is a flat shadow that results from projectig the origial polygo oto a surface Viewig, projectios Hofstra Uiversity 67 Viewig, projectios Hofstra Uiversity 68 Projectio ad Shadows use a modelview matrix Viewig, projectios Hofstra Uiversity 69 7