Anda di halaman 1dari 6

# wgvwK icviY (2D Transformation)

KwDUvi Mvwd Gi ga mePq mvaviY Ges iZc~Y KvRjvi GKwU MvwdKvj `k ev Kvgiv, h `k AeRi vbv(Aevb, AwfhvRb Ges AvKvi) G icvwiZ nq| Avgiv mnR fve ejZ cvwi h, 2D Gi ga Translation(vbviY), Rotation(N~Yb), Scaling, Mirroring, Shearing I Affine icviY Ges djvdj jvK ewaZ (extend) Kiv Ges Aekl wKfve GKwaK icvii mnR GKwU hwMK cwieZb nZ cvi Zv `Lv| KwDUvi Mvwd G Kb RvwgwZK icviY cqvRb nq? Kvibjv njt 1| `Lvi mvnvq 2| gWwjs Uzji mvnvh 3| GKwU BgR gvwbcyjkb Uzji wnme

Translation(vbviY)
vbviY ev Abyev` GKwU Acvikb h GKwU AeRK vbPzZ Ki GKwU wbw` w`K wbw` `~iZi gvag| hw` vbPzwZ fi V = txI + tyJ bZzb AeR cqU P (x, y) icvi cqvRbi viv cvqv hZ cvi Tv _K P(x, y), P = Tv (P).

Tx = 2 Ty =1

## Abyev` (Translation) 3x3

Scaling (wjs)
wjs GKwU cwqv hv, GKwU ei AvqZb K cmvwiZ ev msKzwPZ Ki| GKwU KzIwWbU wjs gvb jvi viv Zvi cwZwU DcvavbK b Kiv nq| GKic ev mgcKwZ gvb me Dcvavbi Rb GKB jvi|

x2

wjs Acvikb t x = x + Sx y = y + Sy

## 2x2 gvwU AvKwZ t

BwZevPK ev cRwUf wjs Gi aeK Sx Ges Sy cwieZb mK ebbv KiZ eenvi Kiv nq h_vg X Ges Y wb`k mvc| GKwU wjs aeK GKwUi Zzjbvq Ab GKwUi mmvib Ges Kg GK `Ni msKvPbi BwZ `q| wfbic wjs t wfbic wjs gvb cwZwU Dcv`vbi Rb wewfb jvi |

Sx = 2 Sy = 0.5

wjs icvi mb nqvi ci bZzb ewU g~j we`yi mvc Ab GKwU Aevb AewZ nq| Aekl we`ywU-B nj wi g~jwe`y| hw` Dfq wjs Dcv`vbi gvb D`vnviY GKB nq Zvnj wjs icviK mRvwZ() ej| hw` s>1GwU GKwU enixKiY hw` s<1GKwU nvm|

## wgvwK N~Yb (2D - Rotation)

N~Yb, e g~j we`y _K h wgjb h w`K NybY nq Zv Nwoi KvUvi gZ, hw` cRwUf Kvb ev c Zvnj, x = x cos() - y sin(),
(x, y) (x, y)

y = x sin() + y cos()

(x, y)

## g~j we`y _K Ges x = r cos ()

(x, y)

y = r sin () x = r cos ( + ) y = r sin ( + ) fve x = r cos() cos() r sin() sin(), y = r sin() sin() + r cos() cos()

## weK fve..... x = x cos() - y sin() y = x sin() + y cos()

hw`I sin()Ges cos() iwLK (nonlinear) dvskb Gi nq| x GKwU x Ges y Gi iwLK mgbq| y GKwU x Ges y Gi iwLK mgbq|

mgmv -1 t A) wKfve GKwU AeR gwUK g~j we`y _K 300 `~i N~Yb ev AveZb LyR ei Kiv hvq| B) hLvb bZzb vbv cqU P (2, -4). mgvavb t ei vbv ne| A) B) cqU P (2, -4) bZzb AeRI ev

mgmv -2 t hw` GKwU wfzRi A(0, 0), B (1, 1) Ges B (5, 2) cqU jv AvevZb ev N~Yb Ki, Zvnj 1| Drcwi mK wK Ges 2| cqU P(-1, -1) Gi mK wK? mgvavbt A) Avgiv, mRvwZ vbv Gi Q`we`y _K GKwU wfzR AvKwZZ gvwU viv wPwZ Kwi t GLb...

B) Avgiv, mRvwZ vbv Gi Q`we`y _K GKwU wfzR AvKwZZ gvwU viv wPwZ Kwi t

GLb...

## wgvwK icviY (3D Transformation)

wgvwK icvibi gZB, wgvwK icvib 4 4 gvwU GKBic ev mRvwZ vbv eenvi Ki Dcvcb Kiv hvq| Avgiv GKBic ev mRvwZ vbv eenvi Ki cqU jv Dcvcb KiZ cvwi| cqU jv njv- P = (x, y, z) ----> P ' = (x, y, z, W). Abyic we`y ev cqU nj P = (x/W, y/W, z/W), 1| GKwU GKic ev mRvwZ we`yi W vbv nj mvaviYZ 1| 2| W = 0 mv_ GKic ev mRvwZ cqU ev we`y njv GKwU wekl w`K Amxg `yiZ AewZ|

## wgvwK vbviY (3D Translation)

GKwU we`y ev cqU-G vbviY(Translation) t

GKic wjs

## x'= x* s , y'= y * s , z'= z * sz

D`vnviYmic, hLb Sx= Sy=Sz = 0.5 Ges eo NbK (sides = 1) Ges Qvb NbK(sides = 0.5) nq Zvnj

## GKwU wbw` wbevwPZ Aevb wjs|

mgmv-1 t wKfve y ivj mgxKiY eenvi Ki, 300 viv N~Yb ev AveZb Kiv hvq| mgvavbt c = cos(30) = 0.866, s = sin(30) = 0.5, Ges c_g jvBbt 3*c + 1*0 + 4*s + 1*0 = 4.6 2q jvBbt 3*0 + 1*1 + 4*0 + 1*0 = 1, 3q jvBbt 3*(-s) + 1*0 + 4*c + 1*0 = 1.964, 4_ jvBbt 3*0 + 1*0 + 4*0 + 1*1 = 1 mgmv-2 t wKfve z ivj mgxKiY eenvi Ki, 300 viv N~Yb ev AveZb Kiv hvq| mgvavbt c = cos(30) = 0.866, s = sin(30) = 0.5, Ges c_g jvBbt 3*c + 1*(-s) + 4*0 + 1*0 = 2.098 2q jvBbt 3*s + 1*c + 4*0 + 1*0 = 2.366, 3q jvBbt 3*0 + 1*0 + 4*1 + 1*0 = 4, 4_ jvBbt 3*0 + 1*0 + 4*0 + 1*1 = 1

References:
Books:
Computer Graphics Principles and Practice, Foley, van Dam, Feiner, and Hughes, Addison-Wesley 1997 2. Computer Graphics, Schaum's Outlines, Plastock and Kalley, McGraw-Hill 1986 3. Principles of Interactive Computer Graphics, Newman and Sproull, McGraw-Hill 1979
1.