Jumat, 25 November 2016

Edit Foto Menggunakan Photoshop

Foto Gedung Sebelum Edit

          Gedung yang digunakan sebagai objek foto adalah Gedung Isola Universitas Pendidikan Indonesia. Gedung ini berdiri pada tahun 1933. Dahulu gedung ini dikenal sebagai Villa Isola, yaitu rumah mewah milik Dominique Willem Beretty. Pada tahun 1936 Isola berubah menjadi sebuah hotel, setelah beberapa kali mengalami perubahan fungsi akhirnya pemerintah Indonesia pada tahun 1954 menggunakannya sebagai kampus Institut Keguruan dan Ilmu Pendidikan (IKIP). Saat ini gedung Isola masih terawat dengan baik dan digunakan sebagai gedung Rektorat UPI yang sebelumnya bernama IKIP (dikutip dari http://www.indotravelers.com/bandung/heritage/villa-isola.html). Pengambilan foto ini sebisa mungkin menempatkan posisi objek di dua pertiga bagian foto.


Foto Gedung Setelah Edit
Unsur-unsur atau proses yang diedit dari foto yang telah didapat adalah:
  1. Pengaturan kontras foto
  2. Pengaturan cahaya foto
  3. Pengaturan saturasi
  4. Pengaturan lighting 
  5. Merubah ukuran foto
  6. Merubah posisi miring gedung isola
  7. Mengganti background langit
  8. Melakukan pemotongan (crop) foto bagian bawah
  9. Menghilangkan gambar fondasi dengan menutupnya menggunakan clone stamp tool dari gambar rumput


Foto Orang Sebelum Edit 
          Foto ini diambil di bagian depan gedung Isola Universitas Pendidikan Indonesia yang memperlihatkan seorang mahasiswa yang sedang membaca buku dengan penuh khidmat. 

Foto Orang Setelah Edit
Unsur-unsur atau proses yang diedit dari foto yang telah didapat adalah:
  1. Pengaturan kontras foto
  2. Pengaturan cahaya foto
  3. Pengaturan saturasi
  4. Pengaturan lighting 
  5. Pengaturan warna, terutama bagian rambut
  6. Merubah ukuran foto
  7. Mengganti background 
  8. Membuat bayangan foto orang, agar sesuai dengan background yang dipilih

Senin, 21 November 2016

Bahan Ajar Operasi Himpunan

          Menurut National Centre for Competency Based Training (2007), bahan ajar adalah segala bentuk bahan yang digunakan untuk membantu guru atau instruktur dalam melaksanakan proses pembelajaran yang disusun secara sistematis, menampilkan sosok utuh dari kompetensi yang akan dikuasai siswa dalam kegiatan pembelajaran. Pada dasarnya berisi tentang pengetahuan, nilai, sikap, tindakan, dan keterampilan yang berisi pesan, informasi, dan ilustrasi berupa fakta konsep, prinsip, dan proses yang terkait dengan pokok bahasan tertentu yang diarahkan untuk mencapai tujuan pembelajaran (dikutip dari http://www.kajianteori.com/2014/02/pengertian-bahan-ajar-menurut-ahli.html).
          Bahan ajar ini dibuat untuk guru atau siswa kelas VII semester 2 tentang operasi himpunan untuk 1 pertemuan, yaitu tentang irisan, gabungan, dan selisih dua himpunan. Di dalam bahan ajar ini diberikan ilustrasi yang dapat memperrmudah siswa memahami pengertian (definisi) dan bagaimana cara untuk menyelesaikan persoalan mengenai irisan, gabungan, dan selisih dua himpunan. Selain itu, bahan ajar ini dilengkapi dengan contoh-contoh soal dan beberapa latihan soal bagi siswa yang disesuaikan dengan indikator yang hendak dicapai disertai pembahasannya.
        

Minggu, 20 November 2016

Program Delphi Mencari Nilai Hampiran Integral Menggunakan Aturan Komposisi Trapesium

procedure TAturanKomposisiTrapesium.Panel3Click(Sender: TObject);
Var
C:array[-100..100]of real;
a,b,h,L0,X,L,y,galat:real;
j,i,n,m:integer;
begin
a:=strtofloat(edit1.Text);
b:=strtofloat(edit2.Text);
m:=strtoint(edit3.Text);
n:=m-1;
h:=(b-a)/n ;
j:=-1;
L0:=0;
repeat
j:=j+1;
x:=a+(j*h);
listbox1.items.add(floattostr(j));
listbox2.items.add(formatfloat('0.######',(x)));
C[j]:=x/(1+(x*x));
listbox3.items.add(formatfloat('0.######',(C[j])));
C[-1]:=-(C[j]);
L:=(h/2)*(C[j]+C[j-1]);
if L>0 then listbox4.Items.Add(formatfloat('0.######',(L)));
L0:=L+L0;
edit4.Text:=formatfloat('0.######',(L0));
i:=i+1;
until j=n;
y:= (0.5)*(ln (1+ sqr(b))-ln (1+ sqr (a)));
edit5.text:= formatfloat('0.######',(y));
galat:= abs(y-L0);
edit6.text:= formatfloat('0.######',(galat));
end;


procedure TAturanKomposisiTrapesium.Panel4Click(Sender: TObject);
begin
edit1.Text:='';
edit2.Text:='';
edit3.Text:='';
edit4.Text:='';
edit5.Text:='';
edit6.Text:='';
listbox1.Items.Clear;
listbox2.Items.Clear;
listbox3.Items.Clear;
listbox4.Items.Clear;

end;

procedure TAturanKomposisiTrapesium.Panel5Click(Sender: TObject);
begin
close;
end;

end.

Sabtu, 19 November 2016

Program Delphi Mencari Persamaan Regresi atau Penghampiran Fungsi Menggunakan Metode Kuadrat Terkecil

procedure TMetodeKuadtratTerkecil.Panel2Click(Sender: TObject);
var
JmlX,JmlY,Mean,JmlXiM,JmlXiM2,JmlYXM,DenomA0,PembilangA0,a0,PembilangA1,DenomA1,a1 : real;
i,j,n,m : integer;
x,y,XiM,XiM2,YXM : array[0..100] of real;


begin
for i:=1 to listbox1.Count do x[i]:=strtofloat(listbox1.Items[i-1]);
for j:=1 to listbox2.Count do y[j]:=strtofloat(listbox2.Items[j-1]);
JmlX:=0;
JmlY:=0;
for i:=1 to listbox1.count do JmlX:=JmlX+x[i];
for j:=1 to listbox2.Count do JmlY:=JmlY+y[j];
n:=listbox1.Count;
Mean:=JmlX/n;
for i:=1 to n do
begin
XiM[i]:=x[i]-Mean;
XiM2[i]:=Sqr(XiM[i]);
YXM[i]:=(y[i])*(XiM[i]);
Listbox4.Items.add(floattostr(XiM2[i]));
Listbox5.Items.Add(Floattostr(YXM[i]));
Listbox3.Items.add(floattostr(XiM[i]));
end;

JmlXiM2:=0;
JmlXiM:=0;
JmlYXM:=0;
for i:=1 to listbox4.Count do
begin
JmlXiM2:=JmlXiM2+XiM2[i];
end;

For i:=1 to listbox3.Count do
begin
JmlXiM:=JmlXiM+XiM[i];
end;

For i:=1 to listbox5.Count do
begin
JmlYXM:=JmlYXM+YXM[i];
end;

PembilangA0:=JmlY*JmlXim2-JmlXim*JmlYXM;
DenomA0:=n*JmlXiM2;
a0:=PembilangA0/DenomA0;
edit8.text:=floattostr(a0);

PembilangA1:=n*JmlYXM;
DenomA1:=JmlXiM2;
a1:=PembilangA1/DenomA1;
edit9.Text:=floattostr(a1);

end;



procedure TMetodeKuadtratTerkecil.Panel3Click(Sender: TObject);
begin
edit1.Text:=' ';
edit2.Text:=' ';
edit8.Text:=' ';
edit9.Text:=' ';
listbox1.Items.Clear;
listbox2.Items.Clear;
listbox3.Items.Clear;
listbox4.Items.Clear;
listbox5.Items.Clear;
end;

procedure TMetodeKuadtratTerkecil.Panel4Click(Sender: TObject);
begin
close;
end;

end.

Program Delphi Mencari Akar Persamaan Linier dengan Menggunakan Metode Iteratif Gauss-Seidel

procedure TForm1.Panel6Click(Sender: TObject);
Var
n, i, j, k, bar, iterasi, maxit:integer;
a:array[1..100,1..100]of real;
x,xlama:array[1..100]of real;
sum, e, epsilon:real;
begin
n:=stringgrid1.RowCount-1;
maxit:=strtoint(edit4.Text);
epsilon:=strtofloat(edit5.Text);
for i:=1 to n do
for j:=1 to n+1 do
begin
a[i,j]:=strtofloat(stringgrid1.Cells[j,i]);
end;
e:=1;
iterasi:=0;
while (e>epsilon) or (iterasi<maxit)do
begin
iterasi:=iterasi+1;
for i:=1 to n do
begin
sum:=a[i,n+1];
for j:=1 to n do
if j<>i then
sum:=sum-x[j]*a[i,j];
xlama[i]:=x[i];
x[i]:=sum/a[i,i];
e:=abs((x[i]-xlama[i])/x[i]);
stringgrid2.cells[i,iterasi]:=floattostr(x[i]);
stringgrid2.Cells[0,iterasi]:=inttostr(iterasi);
stringgrid2.Cells[i,0]:='x'+inttostr(i);
end;
stringgrid2.RowCount:=iterasi+1;
end;
end;


procedure TForm1.Panel7Click(Sender: TObject);
Var
n,m,i,j,k,l,o,p:integer;
begin
edit4.Text:='';
edit5.Text:='';
for i:=0 to stringgrid1.colcount-1 do
stringgrid1.Cols[i].Clear;
for i:=0 to stringgrid2.colcount-1 do
stringgrid2.Cols[i].Clear;

end;
procedure TForm1.Panel8Click(Sender: TObject);
begin
close;
end;

end.

Program Interpolasi Lagrange Menggunakan Delphi

procedure TInterpolasiLagrange.Panel6Click(Sender: TObject);
var
x:array[0..100] of real;
fx:array[0..100] of real;
xt,plag,faktor:real;
i,j,n,m,p:integer;
begin
p:=0;
m:=-1;
repeat
m:=m+1;
p:=p+1;
listbox1.Items.Add(inttostr(m));
until p=listbox2.Count;
for i:=0 to listbox2.Count-1 do x[i]:=strtofloat(listbox2.Items[i]);
for i:=0 to listbox3.Count-1 do fx[i]:=strtofloat(listbox3.Items[i]);
n:=strtoint(edit5.Text);
xt:=strtofloat(edit3.Text);
plag:=0;
for i:=0 to n do
begin
faktor:=1;
for j:=0 to n do if j=i then faktor:=faktor else faktor:=faktor*((xt-x[j])/(x[i]-x[j]));
plag:=plag+faktor*fx[i];
edit4.Text:=floattostr(plag);
end;

end;

procedure TInterpolasiLagrange.Panel7Click(Sender: TObject);
begin
edit1.text:=' ';
edit2.text:=' ';
edit3.text:=' ';
edit4.text:=' ';
edit5.text:=' ';
listbox1.Items.clear;
listbox2.Items.clear;
listbox3.Items.clear;
end;

procedure TInterpolasiLagrange.Panel8Click(Sender: TObject);
begin
close;
end;

end.

Program Delphi Mencari Akar Persamaan Tak Linier dengan Menggunakan Metode Iterasi Titik Tetap

procedure TMetodeIterasiTitikTetap.Panel5Click(Sender: TObject);
var
x0,x1,g0,e,m:Real;
i,n:integer;
function pangkat(p:real;m:integer):real;
var
hasil:real;
o:integer;
begin
hasil:=1;
for o:= 1 to m do
hasil:=hasil*p;
pangkat:=hasil;
end;
begin
  x0:=strtofloat(edit1.text);
  e:=strtofloat(edit2.text) ;
  n:=strtoint(edit3.text);
  i:=0;
repeat
  i:=i+1;
  listbox1.Items.add(inttostr(i));
  listbox2.Items.add(floattostr(x0));
  g0:=1/(pangkat(x0,2)+1);
  x1:=g0;
  listbox3.Items.add(floattostr(x1));
  m:=abs((x1-x0)/x1);
  listbox4.Items.add(floattostr(m));
  if m>e then x0:=x1;
  until
  (i=n) or (m<e);
  edit4.text:=floattostr(x1);
end;



procedure TMetodeIterasiTitikTetap.Panel6Click(Sender: TObject);
begin
edit1.Text:=' ';
edit2.Text:=' ';
edit3.Text:=' ';
edit4.text:=' ';
listbox1.items.Clear;
listbox2.items.Clear;
listbox3.items.Clear;
listbox4.items.Clear;

end;

procedure TMetodeIterasiTitikTetap.Panel7Click(Sender: TObject);
begin
halt;
end;

end.

Program Delphi Mencari Akar Persamaan Tak Linier dengan Menggunakan Metode Newton Raphson

procedure TMetodeNewtonRaphson.Panel5Click(Sender: TObject);
var
  x0,x1,f0,f1,d,e,g:Real;
  i,n:integer;
begin
  x0:=strtofloat(edit1.text);
  d:=strtofloat(edit2.text) ;
  e:=strtofloat(edit3.text) ;
  n:=strtoint(edit4.text);
  i:=0;
repeat
  i:=i+1;
  listbox1.Items.add(inttostr(i));
  listbox2.Items.add(floattostr(x0));
  f0:=(x0*x0*x0*x0)+(2*(x0*x0*x0))-(x0*x0)+(2*x0)-4;
  f1:=(4*(x0*x0*x0))+(6*(x0*x0))-(2*x0)+2;
  listbox4.Items.add(floattostr(f0));
  listbox5.Items.add(floattostr(f1));
  if (abs(f1))<=d then showmessage('kemiringan terlalu kecil');
  x1:=(x0)-(f0/f1);
  listbox3.Items.add(floattostr(x1));
  g:=abs((x1-x0)/x1);
  listbox6.Items.add(floattostr(g));
  if g<=e then x0:=x1;
until
  i=n;
  edit5.Text:=floattostr(x1);
end;



procedure TMetodeNewtonRaphson.Panel6Click(Sender: TObject);
begin
edit1.Text:=' ';
edit2.Text:=' ';
edit3.Text:=' ';
edit4.Text:=' ';
edit5.text:=' ';
listbox1.items.Clear;
listbox2.items.Clear;
listbox3.items.Clear;
listbox4.items.Clear;
listbox5.items.Clear;
listbox6.items.Clear;

end;

procedure TMetodeNewtonRaphson.Panel7Click(Sender: TObject);
begin
halt;
end;

end.

Program Delphi Mencari Akar Persamaan Tak Linier dengan Mengunakan Metode Posisi Palsu

procedure TMetodePosisiPalsu.Panel1Click(Sender: TObject);
var
a,b,e,x,c,d,fa,fb,fc:real;
i:integer;
begin
a:=strtofloat(edit1.text);
b:=strtofloat(edit2.text);
fa:= (a*a*a*a)+(2*(a*a*a))-(a*a)+(2*a)-4;
fb:= (b*b*b*b)+(2*(b*b*b))-(b*b)+(2*b)-4;
if fa*fb>0 then showmessage('proses gagal, tebakan awal tidak cocok')
else
begin
    x:=strtofloat(edit3.text);
    i:=-1;
    repeat
    i:= i+1;
    c:= (((a*fb)-(b*fa))/(fb-fa));
    listbox1.Items.add(floattostr(i));
    listbox2.Items.add(floattostr(a));
    listbox3.Items.add(floattostr(b));
    listbox4.items.add(floattostr(c));
    fa:= (a*a*a*a)+(2*(a*a*a))-(a*a)+(2*a)-4;
    fb:= (b*b*b*b)+(2*(b*b*b))-(b*b)+(2*b)-4;
    fc:= (c*c*c*c)+(2*(c*c*c))-(c*c)+(2*c)-4;
    listbox5.Items.add(floattostr(fa));
    listbox6.Items.add(floattostr(fb));
    listbox7.Items.add(floattostr(fc));
    d:= abs (fc);
    if d <= x then b:= c else a:=c;
    e:= abs ((b-a)/b);
    listbox8.items.add(floattostr(e));
    until e<= x;
    edit4.text:=floattostr(c);


    end;
    end;

procedure TMetodePosisiPalsu.Panel2Click(Sender: TObject);
begin
edit1.Text:=' ';
edit2.Text:=' ';
edit3.Text:=' ';
edit4.Text:=' ';
listbox1.items.Clear;
listbox2.items.Clear;
listbox3.items.Clear;
listbox4.items.Clear;
listbox5.items.Clear;
listbox6.items.Clear;
listbox7.items.Clear;
listbox8.items.Clear;
end;

procedure TMetodePosisiPalsu.Panel3Click(Sender: TObject);
begin
halt;
end;

end.

Program Delphi Mencari Akar Persamaan Tak Linier dengan Metode Bagi Dua

procedure TMetodeBagiDua.Panel1Click(Sender: TObject);
var
a,b,e,x,c,fa,fb,fc:real;
i:integer;
begin
a:=strtofloat(edit1.text);
b:=strtofloat(edit2.text);
fa:= (a*a*a*a)+(2*(a*a*a))-(a*a)+(2*a)-4;
fb:= (b*b*b*b)+(2*(b*b*b))-(b*b)+(2*b)-4;
if fa*fb>0 then showmessage('proses gagal, tebakan awal tidak cocok')
else
begin
    x:=strtofloat(edit3.text);
    i:=-1;
    repeat
    i:= i+1;
    c:=(a+b)/2;
    listbox1.Items.add(floattostr(i));
    listbox2.Items.add(floattostr(a));
    listbox3.Items.add(floattostr(b));
    listbox4.items.add(floattostr(c));
    fa:= (a*a*a*a)+(2*(a*a*a))-(a*a)+(2*a)-4;
    fb:= (b*b*b*b)+(2*(b*b*b))-(b*b)+(2*b)-4;
    fc:= (c*c*c*c)+(2*(c*c*c))-(c*c)+(2*c)-4;
    listbox5.Items.add(floattostr(fa));
    listbox6.Items.add(floattostr(fb));
    listbox7.Items.add(floattostr(fc));
    if fa*fc <= 0 then b:= c else a:=c;
    e:= abs ((b-a)/b);
     listbox8.items.add(floattostr(e));
    until e<= x;
    edit4.text:=floattostr(c);
  

    end;
    end;

procedure TMetodeBagiDua.Panel2Click(Sender: TObject);
begin
edit1.Text:=' ';
edit2.Text:=' ';
edit3.Text:=' ';
edit4.Text:=' ';
listbox1.items.Clear;
listbox2.items.Clear;
listbox3.items.Clear;
listbox4.items.Clear;
listbox5.items.Clear;
listbox6.items.Clear;
listbox7.items.Clear;
listbox8.items.Clear;
end;

procedure TMetodeBagiDua.Panel3Click(Sender: TObject);
begin
halt;
end;

end.

Program Delphi Untuk Mencari Akar-akar Persamaan Kuadrat

procedure TPersamaanKuadrat.Button1Click(Sender: TObject);
var
  a,b,c:integer;
  D,AD,akr1,akr2,e,f:real;
begin
  a:=StrToInt(Edit1.Text);
  b:=StrToInt(Edit2.Text);
  c:=StrToInt(Edit3.Text);
  D:=(b*b-4*a*c);
  if(D>0)then
  AD:=sqrt(b*b-4*a*c);
begin
  akr1:=(-b+AD)/(2*a);
  akr2:=(-b-AD)/(2*a);
  Edit4.Text:=FloatToStr(akr1);
  Edit5.Text:=FloatToStr(akr2);
  Edit6.Text:='Real Berlainan';
end;
  if(D=0)then
 
begin
  akr1:= -b/(2*a);
  akr2:= -b/(2*a);
  Edit4.Text:=FloatToStr(akr1);
  Edit5.Text:=FloatToStr(akr2);
  Edit6.Text:='Real dan Sama';
end;
  if(D<0)then
begin
  e:=-b/(2*a);
  f:=sqrt(-D)/(2*a);
  Edit4.Text:=FloatToStr(e)+' + i' + FloatToStr(f);
  Edit5.Text:=FloatToStr(e)+' - i' + FloatToStr(f);
  Edit6.Text:='Real Imajiner'
end;

end;

procedure TPersamaanKuadrat.Button2Click(Sender: TObject);
begin
edit1.text:=' ';
edit2.text:=' ';
edit3.text:=' ';
edit4.text:=' ';
edit5.text:=' ';
edit6.text:=' ';
end;

procedure TPersamaanKuadrat.Button3Click(Sender: TObject);
begin
MainMenu.Show;
PersamaanKuadrat.Hide;
end;

procedure TPersamaanKuadrat.Panel3Click(Sender: TObject);
begin
edit1.text:=' ';
edit2.text:=' ';
edit3.text:=' ';
edit4.text:=' ';
edit5.text:=' ';
edit6.text:=' ';

end;

procedure TPersamaanKuadrat.Panel4Click(Sender: TObject);
begin
MainMenu.Show;
PersamaanKuadrat.Hide;

end;

end.

Program Delphi Untuk Konversi Pecahan Mata Uang dan Suhu

PECAHAN MATA UANG
procedure TKonversi.Button1Click(Sender: TObject);
var
masukkan,seratus_ribu,lima_puluh_ribu,sepuluh_puluh_ribu,
lima_ribu,seribu,lima_ratus,seratus,lima_puluh,sepuluh,satu:integer;
begin
{100 ribu}
masukkan:=StrToInt(edit1.Text);
seratus_ribu:=masukkan div 100000;
edit2.Text:=IntToStr(seratus_ribu);
{50 ribu}
masukkan:=StrToInt(edit1.Text);
lima_puluh_ribu:=masukkan div 50000 mod 2;
edit3.Text:=inttostr(lima_puluh_ribu);
{10 ribu}
masukkan:=StrToInt(edit1.Text);
sepuluh_puluh_ribu:=masukkan div 10000 mod 5;
edit4.Text:=inttostr(sepuluh_puluh_ribu);
{5 ribu}
masukkan:=StrToInt(edit1.Text);
Lima_ribu:=masukkan div 5000 mod 2;
edit5.Text:=inttostr(lima_ribu);
{seribu}
masukkan:=StrToInt(edit1.Text);
seribu:=masukkan div 1000 mod 5;
edit6.Text:=inttostr(seribu);
{lima ratus}
masukkan:=StrToInt(edit1.Text);
lima_ratus:=masukkan div 500 mod 2;
edit7.Text:=inttostr(lima_ratus);
{seratus}
masukkan:=StrToInt(edit1.Text);
seratus:=masukkan div 100 mod 5;
edit8.Text:=inttostr(seratus);

end;

procedure TKonversi.Button2Click(Sender: TObject);
begin
edit1.Text:=' ';
edit2.Text:=' ';
edit3.Text:=' ';
edit4.Text:=' ';
edit5.Text:=' ';
edit6.Text:=' ';
edit7.Text:=' ';
edit8.Text:=' ';
end;

KONVERSI SUHU
procedure TKonversi.Button3Click(Sender: TObject);
begin
 if jenis_suhu=celcius then
  begin
  label11.Caption:='Fahrenheit';
  label12.Caption:='Kelvin';
  label13.Caption:='Reamur';
  c:=strtofloat(edit9.Text);
  edit10.Text:=floattostr((c*1.8)+32); //fahrenheit
  edit11.Text:=floattostr(c+273.15); //kelvin
  edit12.Text:=floattostr(c*0.8); //reamur
  end
  else
    if jenis_suhu=fahrenheit then
    begin
    label11.Caption:='Celcius';
    label12.Caption:='Kelvin';
    label13.Caption:='Reamur';
    f:=strtofloat(edit9.Text);
    edit10.Text:=floattostr((f-32)/1.8); //celcius
    edit11.Text:=floattostr((f+459.67)/1.8); //kelvin
    edit12.Text:=floattostr((f-32)/2.25); //reamur
    end
      else
      if jenis_suhu=kelvin then
      begin
      label11.Caption:='Celcius';
      label12.Caption:='Fahrenheit';
      label13.Caption:='Reamur';
      k:=strtofloat(edit9.Text);
      edit10.Text:=floattostr(k-273.15); //celcius
      edit11.Text:=floattostr((k*1.8)-459.67); //fahrenheit
      edit12.Text:=floattostr((k-273.15)*0.8); //reamur
      end
        else
        if jenis_suhu=reamur then
        begin
        label11.Caption:='Celcius';
        label12.Caption:='Fahrenheit';
        label13.Caption:='Kelvin';
        re:=strtofloat(edit9.Text);
        edit10.Text:=floattostr(re/0.8); //celcius
        edit11.Text:=floattostr((re*2.25)+32); //fahrenheit
        edit12.Text:=floattostr((re/0.8)+273.15); //kelvin
        end;
end;

procedure TKonversi.RadioButton1Click(Sender: TObject);
begin
jenis_suhu:=celcius;
end;

procedure TKonversi.RadioButton2Click(Sender: TObject);
begin
jenis_suhu:=fahrenheit;
end;

procedure TKonversi.RadioButton3Click(Sender: TObject);
begin
jenis_suhu:=kelvin;
end;

procedure TKonversi.RadioButton4Click(Sender: TObject);
begin
jenis_suhu:=reamur;
end;

procedure TKonversi.Button4Click(Sender: TObject);
begin
edit9.Text:=' ';
edit10.Text:=' ';
edit11.Text:=' ';
edit12.Text:=' ';
end;

procedure TKonversi.Button5Click(Sender: TObject);
begin
MainMenu.Show;
Konversi.Hide;
end;


end.


Program Statistika Menggunakan Delphi

procedure TStatistika.Button1Click(Sender: TObject);
begin
listbox1.Items.Add(edit1.text);
edit1.Text:=' ';
end;

procedure TStatistika.Button2Click(Sender: TObject);
var A:array[0..100] of Integer;
    i,j,k:Integer;
begin
    for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox1.Items[i]);
    for i:=0 to ListBox1.Items.Count-1 do
    for j:=0 to i do
    if A[i]<A[j]
    then begin
    k:=A[i];
    A[i]:=A[j];
    A[j]:=k;
    end;
    for i:=0 to ListBox1.Items.Count-1 do
    ListBox2.Items.Add(IntToStr(A[i]));


end;

procedure TStatistika.Button3Click(Sender: TObject);
var m,i,z,max,min:integer;
    a:array[1..100] of integer;
begin
  z:=listbox1.items.Count;
  edit2.Text:=inttostr(z);


end;

procedure TStatistika.Button4Click(Sender: TObject);
var m,i,z,max,min:integer;
    a:array[1..100] of integer;
begin
  z:=listbox1.items.Count;

  for i:= 1 to z do
  a[i]:= strtoint(listbox1.items[i-1]);
  m:=0;

  for i:= 1 to z do
  m:=m+a[i];
  edit3.text:=inttostr(m);
end;



procedure TStatistika.Button5Click(Sender: TObject);
var m,i,z,max,min:integer;
    a:array[1..100] of integer;
begin
  z:=listbox1.items.Count;

  for i:= 1 to z do
  a[i]:= strtoint(listbox1.items[i-1]);
  m:=0;

  for i:= 1 to z do
  m:=m+a[i];

  max:=-2147483647;
  for i:=1 to z do
    if max<a[i] then max:=a[i];
  Edit4.Text:=IntToStr(max);
end;




procedure TStatistika.Button6Click(Sender: TObject);
var m,i,z,max,min:integer;
    a:array[1..100] of integer;
begin
  z:=listbox1.items.Count;

  for i:= 1 to z do
  a[i]:= strtoint(listbox1.items[i-1]);
  m:=0;

  min:=2147483647;
  for i:=1 to z do
    if min>a[i] then min:=a[i];
  edit5.text:=inttostr(min);

end;



procedure TStatistika.Button8Click(Sender: TObject);
var A:array[0..100] of Integer;
    i,Jumlah,n:Integer;
    z:Real;
begin
    for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox1.Items[i]);
    Jumlah:=0;
    for i:=0 to ListBox1.Items.Count-1 do
    Jumlah:=Jumlah+A[i];
    n:=ListBox1.Items.Count;
    z:=Jumlah/n;
    Edit7.Text:=FloatToStr(z);


end;

procedure TStatistika.Button10Click(Sender: TObject);
Var
A:array[0..100] of real;
c,e,n,i,q:integer;
d,f:real;
begin
n:=listbox2.count;
q:=strtoint(edit9.text);
For i:=1 to n do a[i]:=strtofloat(listbox2.Items[i-1]);


c:=(n+1)*q;
d:=c/4;
e:=c div 4;
f:=d-e;

edit10.Text:=floattostr((f*(a[e+1]-a[e]))+a[e]);


end;

procedure TStatistika.Button11Click(Sender: TObject);
Var
A:array[0..100] of real;
c,e,n,h,l,i,q:integer;
d,f,m,k:real;
begin
n:=listbox2.count;
For i:=1 to n do a[i]:=strtofloat(listbox2.Items[i-1]);


c:=(n+1);
d:=c/4;
e:=c div 4;
f:=d-e;

h:=(n+1)*3;
k:=h/4;
l:=h div 4;
m:=k-l;

edit11.text:=floattostr(((m*(a[l+1]-a[l]))+a[l])-((f*(a[e+1]-a[e]))+a[e]));


end;

procedure TStatistika.Button7Click(Sender: TObject);
Var A:array[0..100] of Integer;
    i,M,N,O:Integer;
begin
for i:=0 to ListBox1.Items.Count-1 do
    A[i]:=StrToInt(ListBox2.Items[i]);
    M:=A[0];
    N:=A[0];
    for i:=0 to ListBox2.Items.Count-1 do
    If M<A[i] then M:=A[i];
    If N>A[i] then N:=A[i];
    O:=M-N;
    Edit6.Text:=IntToStr(O);
end;




procedure TStatistika.Button12Click(Sender: TObject);
begin
edit1.text:=' ';
listbox1.items.Clear;
listbox2.Items.Clear;
edit2.text:=' ';
edit3.text:=' ';
edit4.text:=' ';
edit5.text:=' ';
edit6.text:=' ';
edit7.text:=' ';
edit9.text:=' ';
edit10.text:=' ';
edit11.text:=' ';
edit12.Text:=' ';
edit13.text:=' ';
edit14.text:=' ';
end;

procedure TStatistika.Button14Click(Sender: TObject);
var
  a: array [0..100] of integer;
  i,jml,N : integer;
  rata,SB, Zigma: real;


begin
  N:= ListBox1.Count-1;

  for i:= 0 to N do
      A[i]:= StrToInt (ListBox1.Items[i]);

  jml:= 0;
  for i:= 0 to N do
  jml:= jml + A[i];

  rata:= jml / ListBox1.Count;

  Zigma :=0;
  for i := 0 to N do
    begin
     Zigma:= (Zigma + Sqr(A[i] - rata));
     SB:= Sqrt (Zigma / N);
  end;
  Edit12.Text:= FloatToStr(SB);


end;

procedure TStatistika.Button15Click(Sender: TObject);
const
  Nmax = 100;
type
  Lrk = array [0..100] of string;
var
  k, N, i : integer;
  A: Lrk;

begin
  N:= ListBox2.Count-1;
  for i := 0 to N do
  begin
  A[i]:= ListBox2.Items[i];
  end;

  k:=StrToInt(Edit13.Text);
  Edit14.Text:= A[k-1];
end;


procedure TStatistika.Timer1Timer(Sender: TObject);
begin
label1.Left:=label1.Left-30;
 if  label1.Left<=-100 then
 label1.Left := 950;
end;

procedure TStatistika.Button13Click(Sender: TObject);
begin
MainMenu.Show;
Statistika.Hide;
end;

end.

Operasi pada Matriks Menggunakan Delphi

procedure TMatriks.Button5Click(Sender: TObject);
var
  mat1: array[0..2,0..2] of real;
  mat2: array[0..2,0..2] of real;
  i,j:integer;
begin
  with stringgrid1 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat1 [j,i]:=strtofloat(cells[i,j]);
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat2 [j,i]:=mat1 [i,j];
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  cells [i,j]:= floattostr (mat2[j,i]);

end;

procedure TMatriks.Button3Click(Sender: TObject);
var
  mat1: array[0..2,0..2] of real;
  mat3: array[0..2,0..2] of real;
  i,j:integer;
  k: real;
begin
  k:=strtofloat(edit1.Text);
  with stringgrid1 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat1 [j,i]:=strtofloat(cells[i,j]);
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat3 [j,i]:=k*mat1[j,i];
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  cells [i,j]:= floattostr (mat3[j,i]);


end;

procedure TMatriks.Button1Click(Sender: TObject);
var
  mat1: array[0..2,0..2] of real;
  mat2: array[0..2,0..2] of real;
  mat3: array[0..2,0..2] of real;
  i,j:integer;
begin
  with stringgrid1 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat1 [j,i]:=strtofloat(cells[i,j]);
  with stringgrid2 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat2 [j,i]:=strtofloat(cells[i,j]);
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat3[j,i]:=mat1[j,i]+mat2[j,i];
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  cells [i,j]:= floattostr (mat3[j,i]);



end;

procedure TMatriks.Button2Click(Sender: TObject);
var
  mat1: array[0..2,0..2] of real;
  mat2: array[0..2,0..2] of real;
  mat3: array[0..2,0..2] of real;
  i,j:integer;
begin
  with stringgrid1 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat1 [j,i]:=strtofloat(cells[i,j]);
  with stringgrid2 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat2 [j,i]:=strtofloat(cells[i,j]);
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat3[j,i]:=mat1[j,i]-mat2[j,i];
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  cells [i,j]:= floattostr (mat3[j,i]);

end;

procedure TMatriks.Button6Click(Sender: TObject);
var
  mat1: array[0..2,0..2] of real;
  mat3: array[0..2,0..2] of real;
  mat4: array[0..2,0..2] of real;
  i,j:integer;
  d:real;
begin
  with stringgrid1 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat1 [j,i]:=strtofloat(cells[i,j]);
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  //determinan
  d:= 1 /(((mat1[0,0]*mat1[1,1]*mat1[2,2])+(mat1[0,1]*mat1[1,2]*mat1[2,0])+(mat1[0,2]*mat1[1,0]*mat1[2,1]))-((mat1[0,2]*mat1[1,1]*mat1[2,0])+(mat1[0,0]*mat1[1,2]*mat1[2,1])+(mat1[0,1]*mat1[1,0]*mat1[2,2])));
  //minor kofaktor
  mat3 [0,0]:=(mat1[1,1]*mat1[2,2])-(mat1[1,2]*mat1[2,1]);
  mat3 [1,0]:=(-1) *((mat1[1,0]*mat1[2,2])-(mat1[1,2]*mat1[2,0]));
  mat3 [2,0]:=(mat1[1,0]*mat1[2,1])-(mat1[1,1]*mat1[2,0]);
  mat3 [0,1]:=(-1)*((mat1[0,1]*mat1[2,2])-(mat1[0,2]*mat1[2,1]));
  mat3 [1,1]:=(mat1[0,0]*mat1[2,2])-(mat1[0,2]*mat1[2,0]);
  mat3 [2,1]:=(-1)*((mat1[0,0]*mat1[2,1])-(mat1[0,1]*mat1[2,0]));
  mat3 [0,2]:=(mat1[0,1]*mat1[1,2])-(mat1[0,2]*mat1[1,1]);
  mat3 [1,2]:=(-1)*((mat1[0,0]*mat1[1,2])-(mat1[0,2]*mat1[1,0]));
  mat3 [2,2]:=(mat1[0,0]*mat1[1,1])-(mat1[0,1]*mat1[1,0]);
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat4 [j,i]:=d*mat3[j,i];
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  cells [i,j]:= floattostr(mat4[j,i]);







end;

procedure TMatriks.Button7Click(Sender: TObject);
var
  i:integer;
begin
edit1.Text:=' ';
for i:= 0 to stringgrid1.ColCount-1 do
stringgrid1.cols[i].clear;
for i:= 0 to stringgrid2.ColCount-1 do
stringgrid2.cols[i].clear;
for i:= 0 to stringgrid3.ColCount-1 do
stringgrid3.cols[i].clear;
end;



procedure TMatriks.Button4Click(Sender: TObject);
Var
  mat1: array[0..2,0..2] of real;
  mat2: array[0..2,0..2] of real;
  mat3: array[0..2,0..2] of real;
  mat4: array[0..2,0..2] of real;
  i,j:integer;
begin
  with stringgrid1 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat1 [j,i]:=strtofloat(cells[i,j]);
  with stringgrid2 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat2 [j,i]:=strtofloat(cells[i,j]);
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat3 [0,0]:=(mat1[0,0]*mat2[0,0])+(mat1[0,1]*mat2[1,0])+(mat1[0,2]*mat2[2,0]);
  mat3 [0,1]:=(mat1[0,0]*mat2[0,1])+(mat1[0,1]*mat2[1,1])+(mat1[0,2]*mat2[2,1]);
  mat3 [0,2]:=(mat1[0,0]*mat2[0,2])+(mat1[0,1]*mat2[1,2])+(mat1[0,2]*mat2[2,2]);
  mat3 [1,0]:=(mat1[1,0]*mat2[0,0])+(mat1[1,1]*mat2[1,0])+(mat1[1,2]*mat2[2,0]);
  mat3 [1,1]:=(mat1[1,0]*mat2[0,1])+(mat1[1,1]*mat2[1,1])+(mat1[1,2]*mat2[2,1]);
  mat3 [1,2]:=(mat1[1,0]*mat2[0,2])+(mat1[1,1]*mat2[1,2])+(mat1[1,2]*mat2[2,2]);
  mat3 [2,0]:=(mat1[2,0]*mat2[0,0])+(mat1[2,1]*mat2[1,0])+(mat1[2,2]*mat2[2,0]);
  mat3 [2,1]:=(mat1[2,0]*mat2[0,1])+(mat1[2,1]*mat2[1,1])+(mat1[2,2]*mat2[2,1]);
  mat3 [2,2]:=(mat1[2,0]*mat2[0,2])+(mat1[2,1]*mat2[1,2])+(mat1[2,2]*mat2[2,2]);
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  mat4 [j,i]:=mat3[j,i];
  with stringgrid3 do
  for i:= 0 to 2 do
  for j:= 0 to 2 do
  cells [i,j]:= floattostr(mat4[j,i]);



end;

procedure TMatriks.Button8Click(Sender: TObject);
begin
MainMenu.Show;
Matriks.Hide;
end;

procedure TMatriks.Timer1Timer(Sender: TObject);
begin
label1.Left:=label1.Left-30;
 if  label1.Left<=-150 then
 label1.Left := 600;
end;

end.

Operasi Pada Himpunan Menggunakan Delphi

procedure THimpunan.Panel2Click(Sender: TObject);
begin
  ListBox2.Items.Add(Edit1.Text);
  Edit1.Text:='';

end;

procedure THimpunan.Panel3Click(Sender: TObject);
begin
ListBox3.Items.Add(Edit2.Text);
  Edit2.Text:='';

end;

procedure THimpunan.Panel4Click(Sender: TObject);
begin
ListBox8.Items.Add(Edit3.Text);
  Edit3.Text:='';

end;

procedure THimpunan.Panel5Click(Sender: TObject);
var
  x,y:Integer;
  a,b:Array[0..100] of String;

begin
  For x:=0 to ListBox2.Items.Count-1 do
    a[x]:=ListBox2.Items[x];

  For y:=0 to ListBox3.Items.Count-1 do
    b[y]:=ListBox3.Items[y];

  For x:=0 to ListBox2.Items.Count-1 do
    begin
      For y:=0 to ListBox3.Items.Count-1 do
      if a[x]=b[y] then ListBox1.Items.Add(A[x]);
    end;


end;

procedure THimpunan.Panel6Click(Sender: TObject);
var
  x,y:Integer;
  a,b:Array[0..100] of String;
  p:Boolean;

begin
  For x:=0 to ListBox2.Items.Count-1 do
    a[x]:=ListBox2.Items[x];

  For y:=0 to ListBox3.Items.Count-1 do
    b[y]:=ListBox3.Items[y];

  For x:=0 to ListBox2.Items.Count-1 do
    ListBox4.Items.Add(A[x]);

  For y:=0 to ListBox3.Items.Count-1 do
    begin
      p:=false;

      For x:=0 to ListBox2.Items.Count-1 do
        if a[x]=b[y] then p:=true;
          if p=false then ListBox4.Items.Add(b[y]);
    end;


end;

procedure THimpunan.Panel7Click(Sender: TObject);
Var x,y:Integer;
    a,b:Array[0..100] of String;
    p:Boolean;
begin
    For x:=0 to ListBox2.Items.Count-1 do
    a[x]:=ListBox2.Items[x];
    For y:=0 to ListBox3.Items.Count-1 do
    b[y]:=ListBox3.Items[y];
    For x:=0 to ListBox2.Items.Count-1 do
    begin
      p:=false;
      For y:=0 to ListBox3.Items.Count-1 do
      if a[x]=b[y] then p:=true;
      if p=false then ListBox5.Items.Add(a[x]);
    end;
    For y:=0 to ListBox3.Items.Count-1 do
    begin
      p:=false;
      For x:=0 to ListBox2.Items.Count-1 do
      if a[x]=b[y] then p:=true;
      if p=false then ListBox5.Items.Add(b[y]);
    end;


end;

procedure THimpunan.Panel8Click(Sender: TObject);
var
  x,y:Integer;
  a,b:Array[0..100] of String;
  p:Boolean;

begin
  For x:=0 to ListBox2.Items.Count-1 do
    a[x]:=ListBox2.Items[x];

  For y:=0 to ListBox3.Items.Count-1 do
    b[y]:=ListBox3.Items[y];

  For x:=0 to ListBox2.Items.Count-1 do
    begin
      p:=false;
      For y:=0 to ListBox3.Items.Count-1 do
        if a[x]=b[y] then p:=true;
          if p=false then ListBox6.Items.add(A[x]);
    end;



end;

procedure THimpunan.Panel9Click(Sender: TObject);
var
  i,j:integer;
  A,B:Array [0..100] of string;
  ada:boolean;
begin
for i:=0 to listbox2.Items.Count-1 do
A[i]:=listbox2.Items[i];

for j:=0 to listbox8.items.count-1 do
B[j]:=listbox8.items[j];


for j:=0 to listbox8.Items.Count-1 do
begin
ada:=true;
for i:=0 to listbox8.Items.count-1 do
if B[j]=A[i] then ada:=false;
if ada=true then listbox7.Items.add(B[j]);


 end;

end;

procedure THimpunan.Panel10Click(Sender: TObject);
begin
Edit1.Text:=' ';
Edit2.Text:=' ';
Edit3.Text:=' ';
listbox1.Items.Clear;
listbox2.Items.Clear;
listbox3.Items.Clear;
listbox4.Items.Clear;
listbox5.Items.Clear;
listbox6.Items.Clear;
listbox7.Items.Clear;
listbox8.Items.Clear;

end;

procedure THimpunan.Panel11Click(Sender: TObject);
begin
MainMenu.Show;
Himpunan.Hide;

end;

end.

Program Delphi Untuk Menggambar Grafik

SUMBU KOORDINAT
procedure TGrafik.Button1Click(Sender: TObject);
Function CanvasX(LojikX:Double):Integer;
begin
result:=Round(LojikX + 400);
end;

Function CanvasY(LojikY:Double):Integer;
begin
result:=Round(160-LojikY);
end;

begin
with Image1.canvas do
begin
pen.Width:=3;
font.Size:=12;
font.color:=clolive;

MoveTo(CanvasX(-300),CanvasY(0));  //sumbu x
LineTo(CanvasX(300),CanvasY(0));
textout(canvasX(305),canvasY(0),'sumbu x');


MoveTo(CanvasX(0),CanvasY(-150));  //sumbuy
LineTo(CanvasX(0),CanvasY(150));
textout(canvasX(0),canvasY(150),'sumbu y');

 font.Size:=9;
 font.Color:=clolive;
 textout(canvasX(100),canvasy(-5),'phi');
 textout(canvasX(200),canvasY(-5),'2phi');
 textout(canvasX(-100),canvasy(-5),'-phi');
 textout(canvasX(-200),canvasY(-5),'-2phi');
 textout(canvasX(-10),canvasY(80),'1');
 textout(canvasX(-15),canvasY(-75),'-1');
end;
end;

y = sin x
procedure TGrafik.Button3Click(Sender: TObject);
Function SumbuX(LojikX:Double):Integer;
  begin
    result:=Round(LojikX + 400);
  end;

Function SumbuY(LojikY:Double):Integer;
  begin
    result:=Round(160 - LojikY);
  end;

var i:real;
begin
  with image1.Canvas do
  begin
  pen.Width:=10;
  font.Size:=9;
  font.Color:=clblue;

  i:=-200;
    while i<=200 do
      begin
        Pixels[sumbuX(i),sumbuY(80*Sin(i*2*3.14/200))]:=clblue;
        i:=i+0.03;
        TextOut(sumbuX(185),sumbuY(-40),'y = sin x');
      end;
    end;
end;


y = cos x
procedure TGrafik.Button4Click(Sender: TObject);
Function SumbuX(LojikX:Double):Integer;
  begin
    result:=Round(LojikX + 400);
  end;

Function SumbuY(LojikY:Double):Integer;
  begin
    result:=Round(160 - LojikY);
  end;

var i:real;
begin
with image1.canvas do
  begin
     pen.Width:=10;
     font.size:=9;
     font.Color:=cllime;

     i:=-200;
     while i<=200 do
        begin
          Pixels[sumbuX(i),sumbuY(80*Cos(i*2*3.14/200))]:=cllime;
          i:=i+0.03;
          TextOut(sumbuX(200),sumbuY(80),'y = cos x');
        end;
     end;
end;


y = tan x

procedure TGrafik.Button5Click(Sender: TObject);
Function SumbuX(LojikX:Double):Integer;
  begin
    result:=Round(LojikX + 400);
  end;

Function SumbuY(LojikY:Double):Integer;
  begin
    result:=Round(160 - LojikY);
  end;

var i:real;
begin
  with image1.Canvas do
  begin
  pen.Width:=10;
  font.Size:=9;
  font.Color:=claqua;

  i:=-200;
    while i<=200 do
      begin
        Pixels[sumbuX(i),sumbuY(20*((sin(i*2*3.14/200))/cos(i*2*3.14/200)))]:=claqua;
        i:=i+0.03;
        TextOut(sumbuX(100),sumbuY(-60),'y = tan x');
      end;
    end;
end;


y = 2 - sin x
procedure TGrafik.Button7Click(Sender: TObject);
Function SumbuX(LojikX:Double):Integer;
  begin
    result:=Round(LojikX + 400);
  end;

Function SumbuY(LojikY:Double):Integer;
  begin
    result:=Round(160 - LojikY);
  end;

var i:real;
begin
  with image1.Canvas do
  begin
  pen.Width:=10;
  font.Size:=9;
  font.Color:=clolive;

  i:=-200;
    while i<=200 do
      begin
        Pixels[sumbuX(i),sumbuY(150-(80*Sin(i*2*3.14/200)))]:=clolive;
        i:=i+0.03;
        TextOut(sumbuX(-120),sumbuY(120),'y = 2 - sin x');
      end;
    end;
end;


y = x^2

procedure TGrafik.Button2Click(Sender: TObject);
Function CanvasX(LojikX:Double):Integer;
begin
result:=Round(LojikX + 400);
end;

Function CanvasY(LojikY:Double):Integer;
begin
result:=Round(160-LojikY);
end;

var
i: real;
begin
with image1.canvas do
begin
i:=-200;
while i <= 200 do
begin
pen.Width:=10;
     font.size:=9;
     font.Color:=clred;font.size:=7;
pixels[canvasx(5*i),canvasy(i*i)]:=clred;
i:=i+0.03;
textout(canvasx(-115),canvasy(150),'y=x^2');
end;

end;
end;


y = 2 + tan x

procedure TGrafik.Button6Click(Sender: TObject);
Function SumbuX(LojikX:Double):Integer;
  begin
    result:=Round(LojikX + 400);
  end;

Function SumbuY(LojikY:Double):Integer;
  begin
    result:=Round(160 - LojikY);
  end;

var i:real;
begin
  with image1.Canvas do
  begin
  pen.Width:=10;
  font.Size:=9;
  font.Color:=clyellow;

  i:=-200;
    while i<=200 do
      begin
        Pixels[sumbuX(i),sumbuY(150+(20*((sin(i*2*3.14/200))/cos(i*2*3.14/200))))]:=clyellow;
        i:=i+0.03;
        TextOut(sumbuX(50),sumbuY(20),'y = 2 + tan x');
      end;
    end;


end;



 


Project Gambar Menggunakan Delphi

procedure TGambar.Panel1Click(Sender: TObject);
begin
Label1.caption:='Jeruk Mandarin';
with image1.canvas do
begin
brush.Color:=clred and clyellow;
ellipse(200,90,400,290);


brush.color:=clolive;
rectangle(300,50,310,90);
pen.color:=clgreen;
brush.color:=clgreen;
polygon([point(310,65),point(335,55),point(310,90)]);
brush.style:=bsbdiagonal;
floodfill(300,300,clyellow,fsborder);
end;

end;

procedure TGambar.Panel2Click(Sender: TObject);
begin
MainMenu.Show;
Gambar.Hide;

end;

end.

Senin, 07 November 2016