• Tidak ada hasil yang ditemukan

Tugas 5 Grafikom

N/A
N/A
Protected

Academic year: 2017

Membagikan "Tugas 5 Grafikom"

Copied!
7
0
0

Teks penuh

(1)

TUGAS 5 GRAFIKA KOMPUTER

(Untuk memenuhi Tugas Mata Ajar Grafika Komputer Semester Genap Tahun Pelajaran 2014/2015)

Disusun oleh

Nama

: Ahmad Arif Faizin

NIMq

: 21060112120027

JURUSAN TEKNIK ELEKTRO

FAKULTAS TEKNIK

(2)

1.

Spline Interpolation of Sine Data

1. x = 0:10; 2. y = sin(x); 3. xx = 0:.25:10;

4. yy = spline(x,y,xx); 5. plot(x,y,'o',xx,yy)

2.

Spline Interpolation of Distribution and Specify Endpoint Slopes

1. x = -4:4;

2. y = [0 .15 1.12 2.36 2.36 1.46 .49 .06 0]; 3. cs = spline(x,[0 y 0]);

4. xx = linspace(-4,4,101);

(3)

3.

Spline Interpolation of Angular Data

1. x = pi*[0:.5:2];

2. y = [0 1 0 -1 0 1 0; 3. 1 0 1 0 -1 0 1]; 4. pp = spline(x,y);

5. yy = ppval(pp, linspace(0,2*pi,101));

6. plot(yy(1,:),yy(2,:),'-b',y(1,2:5),y(2,2:5),'or'), axis equal

4.

Spline Interpolation of Sine and Cosine Data

1.

x = 0:.25:1;

2.

Y = [sin(x); cos(x)];

3.

xx = 0:.1:1;

4.

YY = spline(x,Y,xx);
(4)

6.

hold on

7.

plot(x,Y(2,:),'o',xx,YY(2,:),':')

8.

hold off

5. Interpolation

1.

x = 2*pi*[0 1 .1:.2:.9];

2.

y = cos(x);

3.

cs = csapi(x,y);

4.

fnplt(cs,2);

5.

axis([-1 7 -1.2 1.2])

6.

hold on

7.

plot(x,y,'o')

8.

hold off

6. Linear interpolation

1.

x = 2*pi*[0 1 .1:.2:.9];

2.

y = cos(x);
(5)

5.

fnplt(csp,'g')

6.

hold off

7.

cs = csapi(x,y);

8.

pl = spapi(2, x, y);

9.

hold on

10.

fnplt(pl, 'r', 2)

11.

hold off

7. Knot Selection

1.

x = linspace(0,10,101);

2.

y = exp(x);

3.

sp0 = spap2( augknt(0:2:10,4), 4, x, y );

4.

plot(x,y-fnval(sp0,x),'r','LineWidth',2)

5.

sp1 = spap2( newknt(sp0), 4, x, y );

6.

hold on

7.

plot(x,y-fnval(sp1,x),'k','LineWidth',2)

8.

hold off

9.

Hermite Spline

(6)

2.

y = [-1 -1 -1 0 1 1 1];

3.

t = -3:.01:3;

4.

p = pchip(x,y,t);

5.

s = spline(x,y,t);

6.

plot(x,y,'o',t,p,'-',t,s,'-.')

7.

legend('data','pchip','spline',4)

10.

Cubic Spline Interpolation

1.

x = [1 1.5 2 4.1 5];

2.

y = [1 -1 1 -1 1];

3.

plot(xx,csapi(x,y,xx),'k-',x,y,'ro')

4.

title('Cubic Spline Interpolant to Five Points')

11. Beizer Spline

1. pt1 = [ 5;-10]; 2. pt2 = [18; 18]; 3. pt3 = [38; -5]; 4. pt4 = [45; 15]; 5.

6. cla

(7)

8. placelabel(pt2,'pt_2'); 9. placelabel(pt3,'pt_3'); 10. placelabel(pt4,'pt_4'); 11. xlim([0 50])

12. axis equal

13. pts = kron((1-t).^3,pt1) + t).^2.*t,pt2) + kron(3*(1-t).*t.^2,pt3) + kron(t.^3,pt4);

14.

15. hold on

Referensi

Dokumen terkait

Dalam penelitian ini masalah dibatasi hanya pada soal Ulangan Tengah Semester Mata Pelajaran Penjasorkes Kelas VII Semester Genap SMP N 2 Wonosari Tahun Ajaran 2014/2015

Diajukan untuk memenuhi mata kuliah DI.38309 Tugas Akhir Semester I tahun akademik 2014/2015.

Penelitian ini bertujuan untuk menganalisis butir soal pilihan ganda Ulangan Akhir Semester Genap tahun pelajaran 2014/2015 mata pelajaran IPS kelas III SD di

Validitas isi pada soal pilihan ganda Ulangan Akhir Semester (UAS) genap tahun pelajaran 2014/2015 mata pelajaran Bahasa Indonesia kelas III SD se-Kecamatan

Analisis butir soal pada penelitian ini dilakukan pada butir soal pilihan ganda Ulangan Akhir Semester (UAS) genap tahun pelajaran 2014/2015 mata pelajaran IPA kelas IV

Foto copy SK Pembagian Tugas Guru Dalam Pembelajaran Semester Ganjil dan Genap Tahun Pelajaran 2013/2014.. Laporan dan Evaluasi Penilaian Kinerja Guru Mata Pelajaran

Diajukan untuk Memenuhi Syarat Menempuh Ujian Akhir Nasional Mata Pelajaran Bahasa dan Sastra Indonesia. Serta Tugas Akhir Semester Genap Karya Tulis Ilmiah

TUGAS MANDIRI TIDAK TERSTRUKTUR Satuan Pendidikan : MAN WAJO Mata Pelajaran : BAHASA INDONESIA Kelas : X Semester : Genap TahunPelajaran : 2023-2024 N o Kom petensi Dasar Materi