Lecture 9: Objects and Transformations in 3D Computer Graphics, Study notes of Introduction to Sociology

A lecture note from dr. Farhana bandukwala's introduction to computer graphics course, focusing on geometric objects and transformations in 3d. Topics include curves, surfaces, volumetric objects, coordinate systems, and matrix representations of transformations such as translation, scaling, and rotations. The document also covers composite transformations and changing coordinate systems.

Typology: Study notes

Pre 2010

Uploaded on 03/28/2010

koofers-user-kyv
koofers-user-kyv 🇺🇸

10 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to
Computer Graphics
Farhana Bandukwala, PhD
Lecture 9: Objects and
Transformations in 3D
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Lecture 9: Objects and Transformations in 3D Computer Graphics and more Study notes Introduction to Sociology in PDF only on Docsity!

Introduction toComputer GraphicsFarhana Bandukwala, PhDLecture 9: Objects andTransformations in 3D

Outline

• Geometric objects & operators

(Angel, chapter 4.1)

• Coordinate systems and transformations^ (Angel, chapter 4.2) • Matrix representations

(Angel, chapter 4.3)

• Composite transformations

Coordinate systems

-^ Points in 3-d w/respect to 3 linearly independent vectors(basis or coordinate system)•^ Frame: coordinate system and defined origin

∆^ defines

all 3-d points uniquely• All 3-d points (or vectors) can be represented as a three-tuple in terms of basis vectors:• For example: a

1 = ae 1

2 + ae 2

3 + ae 3

a (^2) e (^1) e

(^3) e

Transformations in 3D

Use homogeneous coordinates, and represent 3Dpoints as four-tuples (x,y,z,W)

dx 0 1 0

d^ y 0 0 1

d^ z 0 0 0

Translation

s^0 0 x^

0 s^0 y^

0 0 sz

Scaling

Composite Transformations • To rotate about a fixed point: 1.^ Translate point to origin,2.^ Rotate object3.^ Reverse previous translationz x

z P x^

y P

z x P y^ x

z P y^ x

z

y P

-px 0 1 0

-p^ y 0 0 1

-p^ z 0 0 0

Translation T(-P) =

0 cosT^

-sinT^0 0 sinT^

cosT^0 0 0

Rotation around xR(T) =

px 0 1 0

p^ y 0 0 1

p^ z 0 0 0

TranslationT(P)=

M = T(P)R(

T)T(-P)

Composite TransformationTo rotate about an arbitrary axis (

A) by^ α:

-^ rotate such that rotation vector (

A) aligned with z-axis

-^ then rotate by desired angle–^ Reverse first rotation^ M = R(-

T) R(-T) R(x^ y

D) R(T) R(zy

T)x

x^

y z

z x Tx y

z x A P y

z x

y Ty

x^

y z

Rotate by

Tx around x axis

Rotate by

Ty around y axis

Rotate by

D

around z axis

Reverse rotationsaround x & y axes Remember:Dot products give anglesbetween 2 vectors

Changing coordinate systemsConsider three linearly independent vectors:^1 –^ v= v

1 e+ v 1112

2 e+ ve^13

3

2 – v= v

1 e+ v 2122

2 e+ ve^23

3

3 – v= v

1 e+ v 3132

2 e+ ve^33

3

  • coordinate system as a transformation matrix

(^2) e (^1) e

(^3) e (^2) v^1 v

(^3) v

Suppose b

is the vector coincident with a

but with respect to the 2

a^ same as nd^ basis

b

(^1) v^ = (^2) v (^3) v -1^ a = Vb

v^ v^11

v^13 vv^21

v^23 vv^31

e v 33 (^12) e (^3) e