Pengantar grafik komputer dan olah citra

<!– @page { margin: 2cm } P { margin-bottom: 0.21cm } TD P { margin-bottom: 0cm } –>

Ganjil / NPM 31108731

Cara menghitung posisi pixel hingga mmbentuk sebuah garis yang menghubungkan sebuah titik (12,9) dan (17,14)

  1. End point     Awal     => P1 (12,9) à (X0,Y0)

    Akhir     => P2 (17,13)

  1. X = X2 – X1 = 17 – 12 = 5

    Y = Y2 – Y1 = 13 – 9 = 4

    2∆Y = 2 . 4 = 8

    2∆Y – 2∆X = 2 . 4 – 2 . 5 = -2

    P0 = 2∆Y – ∆X

    = (2.4) – 5

    = 8 – 5

    = 3

K

PK < 0

XK + 1 , YK + 1

PK + 1 = PK + 2Y-2∆X

XK + 1 , YK

PK + 1 = PK + 2Y

0

P0 < 0

X0 + 1 , Y0 + 1

P0 + 1 = P0 + 8 – 10

3

12 + 1 , 9 + 1

P1 = 3 + 8 – 10

13 , 10

P1 = 11- 10 = 1

1

P1 < 0

X1 + 1 , Y1 + 2

P1 + 1 = P1 + 8 – 10

1

13 + 1 , 10 + 1

P2 = 1 + 8 – 10

14 , 11

P2 = 9 – 10 = -1

2

P2 < 0

X2 + 1 , Y2

P2 + 1 = P2 +8

-1

14 + 1 , 11

P3 = -1 + 8

15 , 11

P3 = 7

3

P3 < 0

X3 + 1 , Y3 + 4

P3 + 1 = P3 + 8 – 10

7

15 + 1 , 11 + 1

P3 = 7 + 8 – 10

16 , 12

P3 = 15 – 10 = 5

4

P4 < 0

X4 + 1 , Y4 + 5

5

16 + 1 , 12 + 1

17 , 13

Tinggalkan komentar

Belum ada komentar.

Comments RSS TrackBack Identifier URI

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s