Iitd cse summer workshop computer graphics
This presentation is the property of its rightful owner.
Sponsored Links
1 / 14

IITD CSE Summer Workshop Computer Graphics PowerPoint PPT Presentation


  • 53 Views
  • Uploaded on
  • Presentation posted in: General

IITD CSE Summer Workshop Computer Graphics. Subodh Kumar. 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0. x y z 1. Perspective Transformation. x,y,z,w. x,y,z,z. 1. Linear and Affine transform. Linear: x’ = Ax Scale, Rotation T(a x + b y ) = aT( x ) + bT( y ) Affine: Translate x ’ = A x + b

Download Presentation

IITD CSE Summer Workshop Computer Graphics

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Iitd cse summer workshop computer graphics

IITD CSE Summer WorkshopComputer Graphics

Subodh Kumar


Perspective transformation

1 0 0 0

0 1 0 0

0 0 1 0

0 0 1 0

x

y

z

1

Perspective Transformation

x,y,z,w

x,y,z,z

1


Linear and affine transform

Linear and Affine transform

  • Linear: x’ = Ax

    • Scale, Rotation

    • T(ax + by) = aT(x) + bT(y)

  • Affine: Translate

    • x’ = Ax + b

    • Transforms a line to a line

    • Respects parallelism

    • Does not respect angles and lengths


Projective transformation

Projective Transformation

  • n-dimensional projective space is an n+1-dimensional vector space

    • 0,0,0,… is not a part of this space

    • x = kx

    • xn+1 == 0 => Point at infinity {= Direction}

      • Actually any coordinate may be chosen

  • Affine space is a projection of Projective space

    • Typically on the plane xn+1 = 1

  • Projective transformation

    • xj = ∑aixi

    • Ax, A is a 4x4 matrix (15 DOF!)


Normal transformation

Normal Transformation

n.p = 0

nTp = 0

=> n’T Mp must be 0

=> (M’n)T Mp = 0

=> nTM’T Mp = 0

=> M’T M = kI

=> M’T = M-1 (k = 1)

=> M’ = k(M-1)T


Attribute interpolation

zp-zl xp-xl

=

zr-zl xr-xl

Attribute Interpolation

x0,y0,z0

y = mx + c

x = 1/m(y+c)

=ay+b

x2,y2,z2

x+1 = ay+a + b

= x + a

x1, y1,z1

zp+1 = zp + k


Perspective distortion

Perspective Distortion

z2

z1


Perspective distortion1

Perspective Distortion


Perspective distortion2

Perspective Distortion


Perspective correction

Perspective Correction

  • Linear interpolation:

    • p(t) = p1 + (p2 – p1) u, 0 <= u<= 1

  • Screen space interpolation:

    • ys = y1s + t (y2s – y1s)

    • same as: y/z = y1/z1 + t (y2/z2 – y1/z1)

  • But really:

    • y = y1 + u (y2 – y1)

    • z = z1 + u (z2 – z1)


Perspective correction1

Perspective Correction


Perspective corrected

Perspective Corrected


Graphics sw architecture top view

Xlib

GLX

OpenGL

GLU

Application

GDI

WGL

OGL/DX

GLU

Application

Graphics SW ArchitectureTop View

Windows

Unix


Opengl architecture

OpenGL Architecture

Client

State Update / Action

Pushbuffer

Machine

state

Frame

Buffer

Must Respect PB order


  • Login