er

Berbagai Tutorial dan Info Menarik

Belajar, Berjuang, dan Bertaqwa

Wednesday 29 October 2014

Membandingkan kualitas audio berdasarkan Sample Rate, Bit Depth, dan Bit Rate



A.    Tujuan
  1. Mahasiswa dapat mengganti nilai Sample dan Bit Depth sebuah file audio.
  2. Mahasiswa dapat menjelaskan perbandingan kualitas audio berdasarkan nilai Bit Depth, Sample Rate.
B.     Teori Singkat
          Audio adalah getaran udara pada frekwensi yang dapat didengar oleh telinga manusia sehingga disebut dengan frekwensi suara atau freuensi audio. Frekuensi audi berada diantara 20 Hz sd 20 KHz.
          Bit Depth adalah nilai resolusi suara atau jumlah tingkatan level suara. Audio 8 bit menyediakan 2 pangkat delapan atau 256 level. Audio 16 bit menyediakan 65.536 level dan audio 32 bit memiliki jumlah jangkauan 2 pangkat 32 . Makin tinggi nilai jangkauan makin baik kualitas. Namun demikian ukuran file yang diperlukan juga semakin besar. Sample Rate adalah beberapa gelombang yang di ambil dalam 1 detik. WAV (Windows Format Wave ) ini adalah format standar audio yang belum terkompres pada Windows, dan didukung di hampir semua sistem komputer. Hal ini juga dapat ringan dikompresi (sekitar 4:1) menggunakan codec ADPCM, tapi ini kurang banyak didukung pada platform non-jendela. Audacity dapat membaca dan menulis format ini, termasuk ADPCM pada semua platform.
          MP3 adalah audio format terkompresi itu adalah cara yang sangat populer untuk menyimpan musik. Hal ini dapat memampatkan audio dengan faktor 10:1 dengan sedikit penurunan dalam kualitas. Audacity dapat baik impor dan ekspor format ini. Ogg adalah format multimedia gratisan yang dirancang untuk streaming dan penyimpanan yang effiesien. Format ini dikembangkan oleh Xiph.org Foundation. Begitu pula Vorbis yang merupakan codec audio gratisan. Vorbis biasanya dipasang bersama Ogg, sehingga muncullah yang namanya Ogg Vorbis. Peluncuran format dan codec ini sebenarnya respon atas rencana pemilik MP3 pada tahun 1998 yang hendak mengenakan biaya lisensi untuk format MP3. OggVorbis sangat populer dikalangan open source, karena kualitas dan sifatnya yang gratis. Namun hingga saat ini walaupun gratis, masih sedikit player yang mendukung format ini, salah satu yang terkenal adalah winamp yang ikut mendukung format Ogg Vorbis.

          WMA ( Window Media Audio ) adalah codec untuk lossy compression, yang dikembangkan pertama sekali ujua untuk menyaingi MP3 oleh Microsoft. Sementara ini Microsoft memposisikan WMA bersaing dengan AAC yang digunakan pada produk Apple seperti iPod dan iTunes Music Strore. WMA juga menggunakan sistem Digital Rights Management seperti AAC untuk proteksi penggandaan dan membatasi pemutaran pada PC atau peranti tertentu. WMA audio stream hampir selalu dengan file ASF. Jika hanya membawa data audio, biasnya file mempunyai ekstensi .WMA. Adapula versi lossless untuk multichannel surround sound dan untuk voice encoding (WMA Voice).

C.    Alat dan Bahan
-          PC Intel® Celeron® CPU 877 @ 1.40GHz
-          Software Audition
-          File audio
·         Judul     : Risalah Hati (Dewa 19)
·         Ukuran  : 4.46 MB
·         Format  : MP3
·         Bit Rate            : 128 kbps

D.    Langkah Kerja
-          Buka Adobe Audition
-          Import File Audio dengan cara pada window File klik ikon Import File – Pilih file yang diinginkan – klik ganda file tersebut atau klik tombol Open.
-          Sekarang file yang akan diedit sudah berada pada window File.
-          Klik ganda ikon file yang akan di edit atau drag and drop ke window editor (Main)
-          Untuk melihat informasi tentang file ini letakkan pointer pada window editor, klik kanan dan pilih File Info.
-          Untuk mengganti Bit Depth  dan Sample Rate ,
o   Buka sesion baru: File – New
o   Pada Jendala New Waveform Pilih Sample Rate dan Bit Rate sesuai dengan yang dibutuhkan (tabel 1)
o   Klik OK, maka akan muncul file baru dengan nama untlited ,
-          Untuk memasukkan file lagu ke dalam untlited.
o   Klik kanan lagu yang akan di ganti sample rate dan bit depth nya,
o   Klik Copy
o   Kemudian buka file untlited dan paste kan lagu tadi di situ,
o   Maka adobe Audition akan mengenerate lagu menjadi ukuran sample rate dan bith depth yang kita inginkan
o   Maka sample rate dan bit depth lagu telah berubah.
-          Untuk menyimpan file lagu,
o   File untlited tadi bisa kita ganti namanya pada saat proses penyimpanan
o   Klik file untlited => file => save as => ganti nama sesuai dengan keinginan => klik OK
o   Maka file akan tersimpan dan namanya sudah berubah.


E.     Hasil Kerja
1.      Table Hasil
1.      Membandingkan berdasarkan Bit Dept

Simple Rate
Bit Dept
Ukuran File
Kualitas Suara
44100
8 bit
4.46 Mb
Tidak jernih karena terdapat suara bising
44100
16 bit
4.46 Mb
Suara bising(noise) masih ada tetapi sudah sangat kecil
44100
32 bit
4.46 Mb
Suara jernih

2.      Membandingkan berdasarkan Sample Rate
Simple Rate(Hz)
Bit Depth
Ukuran File
Kualitas Suara
11025
32 bit
1.11 MB
Suara tidak jernih, terdengar seperti audio tempo dulu
22050
32 bit
3.35 MB
Suara jernih (sedikit ada noise)
32000
32 bit
4.46 MB
Suara jernih
44100
32 bit
4.46 MB
Suara jernih
48000
32 bit
4.46 MB
Suara jernih dan suara lebih bergema
96000
32 bit
Tidak bisa disimpan



3.      Membandingkan berdasarkan  Bit Rate

Bit Rate
Sample Rate
Ukuran File
Kualitas Suara
20
11025
715 kb
Volume kecil, terdengar seperti audio tempo dulu, dan tidak jernih
32
11025
1.11 MB
Masih belum terdengar jernih
64
11025
5.27 kb
Tidak bisa di putar
128
11025
Tidak bisa disimpan
256
11025
Tidak bisa disimpan
320
11025
Tidak bisa disimpan


Bit Rate
Sample Rate
Ukuran File
Kualitas Suara
20
44100
Tidak bisa disimpan
32
44100
1.11 MB
Seperti suara yang berasal dari dalam air, tidak jelas.
64
44100
Tidak bisa disimpan
128
44100
2.23 MB
Jelas tapi masih sedikit noise yang terdengar
256
44100
8.93 MB
Suara jernih dan bergema
320
44100
11.1 MB
Suara jernih dan lebih bergema dari sebelumnya



F.     Kesimpulan

       Rate adalah menunjukkan jumlah sinyal audio yang diambil dalam satu detik ketika melakukan rekaman suara. Semakin tinggi nilai sample rate ini kualitas audio yang dimainkan semakin baik. Kualitas Audio ditentukan oleh Sample rate dan Bit Rate, Semakin tinggi  bit dep nya  maka kualitas suara akan semakin baik.

Saturday 25 October 2014

Gambar Sederhana 2D OpenGL (2)

Tema              : Pariwisata Indonesia
Judul Proyek : Museum Fatahillah Jakarta
Deskripsi       
       Gambar 2 dimensi Museum Fatahillah yang berada di daerah Jakarta dibuat dengan menggunakan aplikasi codeblock dengan menggunakan bahasa c++. Objek 2 dimensi ini dibuat sedemikian rupa agar tampak seperti bentuk aslinya. Walaupun masih jauh dengan kenyataan, setidaknya gambar 2 dimensi yang menggunakan aplikasi codeblock ini dibuat secara pribadi dan dibuat semenarik mungkin untuk mendekati gambar aslinya.

#include<GL/glut.h>
#include<stdlib.h>

void display(){
   glClear( GL_COLOR_BUFFER_BIT);

   glPointSize(8);
   glLineWidth(3);


//latarhalaman

glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.3, 0.3, 0.3);
glVertex3f (-1.03, -0.70, 0.0);
glVertex3f (1.72, -0.70, 0.0);

glVertex3f (1.72, -0.70, 0.0);
glVertex3f (1.72, -1.00, 0.0);

glVertex3f (1.72, -1.00, 0.0);
glVertex3f (-1.03, -1.00, 0.0);

glVertex3f (-1.03, -1.00, 0.0);
glVertex3f (-1.03, -0.60, 0.0);

glEnd ();


//lantaisatu
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.87, -0.65, 0.0);
glVertex3f (0.87, -0.65, 0.0);

glVertex3f (0.87, -0.65, 0.0);
glVertex3f (0.87, -0.02, 0.0);

glVertex3f (0.87, -0.02, 0.0);
glVertex3f (-0.87, -0.02, 0.0);

glVertex3f (-0.87, -0.02, 0.0);
glVertex3f (-0.87, -0.65, 0.0);

glEnd ();


//pintu1
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.82, -0.60, 0.0);
glVertex3f (-0.73, -0.60, 0.0);

glVertex3f (-0.73, -0.60, 0.0);
glVertex3f (-0.73, -0.32, 0.0);

glVertex3f (-0.73, -0.32, 0.0);
glVertex3f (-0.82, -0.32, 0.0);

glVertex3f (-0.82, -0.32, 0.0);
glVertex3f (-0.82, -0.60, 0.0);

glEnd ();

//jendela1
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.82, -0.25, 0.0);
glVertex3f (-0.73, -0.25, 0.0);

glVertex3f (-0.73, -0.25, 0.0);
glVertex3f (-0.73, -0.17, 0.0);

glVertex3f (-0.73, -0.17, 0.0);
glVertex3f (-0.82, -0.17, 0.0);

glVertex3f (-0.82, -0.17, 0.0);
glVertex3f (-0.82, -0.25, 0.0);

glEnd ();


//pintu2
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.60, -0.60, 0.0);
glVertex3f (-0.51, -0.60, 0.0);

glVertex3f (-0.51, -0.60, 0.0);
glVertex3f (-0.51, -0.32, 0.0);

glVertex3f (-0.51, -0.32, 0.0);
glVertex3f (-0.60, -0.32, 0.0);

glVertex3f (-0.60, -0.32, 0.0);
glVertex3f (-0.60, -0.60, 0.0);

glEnd ();


//jendela2
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.60, -0.25, 0.0);
glVertex3f (-0.51, -0.25, 0.0);

glVertex3f (-0.51, -0.25, 0.0);
glVertex3f (-0.51, -0.17, 0.0);

glVertex3f (-0.51, -0.17, 0.0);
glVertex3f (-0.60, -0.17, 0.0);

glVertex3f (-0.60, -0.17, 0.0);
glVertex3f (-0.60, -0.25, 0.0);

glEnd ();

//pintu3
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.38, -0.60, 0.0);
glVertex3f (-0.29, -0.60, 0.0);

glVertex3f (-0.29, -0.60, 0.0);
glVertex3f (-0.29, -0.32, 0.0);

glVertex3f (-0.29, -0.32, 0.0);
glVertex3f (-0.38, -0.32, 0.0);

glVertex3f (-0.38, -0.32, 0.0);
glVertex3f (-0.38, -0.60, 0.0);

glEnd ();


//jendela3
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.38, -0.25, 0.0);
glVertex3f (-0.29, -0.25, 0.0);

glVertex3f (-0.29, -0.25, 0.0);
glVertex3f (-0.29, -0.17, 0.0);

glVertex3f (-0.29, -0.17, 0.0);
glVertex3f (-0.38, -0.17, 0.0);

glVertex3f (-0.38, -0.17, 0.0);
glVertex3f (-0.38, -0.25, 0.0);

glEnd ();
//pintu4tengah
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.16, -0.65, 0.0);
glVertex3f (0.22, -0.65, 0.0);

glVertex3f (0.22, -0.65, 0.0);
glVertex3f (0.22, -0.07, 0.0);

glVertex3f (0.22, -0.07, 0.0);
glVertex3f (-0.16, -0.07, 0.0);

glVertex3f (-0.16, -0.07, 0.0);
glVertex3f (-0.16, -0.65, 0.0);

glEnd ();



//pintu4
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.32, -0.60, 0.0);
glVertex3f (0.41, -0.60, 0.0);

glVertex3f (0.41, -0.60, 0.0);
glVertex3f (0.41, -0.32, 0.0);

glVertex3f (0.41, -0.32, 0.0);
glVertex3f (0.32, -0.32, 0.0);

glVertex3f (0.32, -0.32, 0.0);
glVertex3f (0.32, -0.60, 0.0);

glEnd ();

//jendela4
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.32, -0.25, 0.0);
glVertex3f (0.41, -0.25, 0.0);

glVertex3f (0.41, -0.25, 0.0);
glVertex3f (0.41, -0.17, 0.0);

glVertex3f (0.41, -0.17, 0.0);
glVertex3f (0.32, -0.17, 0.0);

glVertex3f (0.32, -0.17, 0.0);
glVertex3f (0.32, -0.25, 0.0);

glEnd ();

//pintu5
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.52, -0.60, 0.0);
glVertex3f (0.61, -0.60, 0.0);

glVertex3f (0.61, -0.60, 0.0);
glVertex3f (0.61, -0.32, 0.0);

glVertex3f (0.61, -0.32, 0.0);
glVertex3f (0.52, -0.32, 0.0);

glVertex3f (0.52, -0.32, 0.0);
glVertex3f (0.52, -0.60, 0.0);

glEnd ();


//jendela5
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.52, -0.25, 0.0);
glVertex3f (0.61, -0.25, 0.0);

glVertex3f (0.61, -0.25, 0.0);
glVertex3f (0.61, -0.17, 0.0);

glVertex3f (0.61, -0.17, 0.0);
glVertex3f (0.52, -0.17, 0.0);

glVertex3f (0.52, -0.17, 0.0);
glVertex3f (0.52, -0.25, 0.0);

glEnd ();


//pintu6
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.73, -0.60, 0.0);
glVertex3f (0.82, -0.60, 0.0);

glVertex3f (0.82, -0.60, 0.0);
glVertex3f (0.82, -0.32, 0.0);

glVertex3f (0.82, -0.32, 0.0);
glVertex3f (0.73, -0.32, 0.0);

glVertex3f (0.73, -0.32, 0.0);
glVertex3f (0.73, -0.60, 0.0);

glEnd ();

//jendela6
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.73, -0.25, 0.0);
glVertex3f (0.82, -0.25, 0.0);

glVertex3f (0.82, -0.25, 0.0);
glVertex3f (0.82, -0.17, 0.0);

glVertex3f (0.82, -0.17, 0.0);
glVertex3f (0.73, -0.17, 0.0);

glVertex3f (0.73, -0.17, 0.0);
glVertex3f (0.73, -0.25, 0.0);

glEnd ();

// atap
glPushMatrix ();

glLineWidth (2.0f);
glBegin (GL_POLYGON);
glColor3f (1.0f, 0.2f, 0.0f);

glVertex3f (-0.87, -0.07, 0.0);
glVertex3f (0.87, -0.07, 0.0);

glVertex3f (0.87, -0.01, 0.0);
glVertex3f (0.77, 0.15, 0.0);

glVertex3f (0.77, 0.15, 0.0);
glVertex3f (-0.77, 0.15, 0.0);

glVertex3f (-0.77, 0.15, 0.0);
glVertex3f (-0.87, -0.01, 0.0);

glEnd ();


//jendelatengahataskiri
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.13, -0.27, 0.0);
glVertex3f (0.02, -0.27, 0.0);

glVertex3f (0.02, -0.27, 0.0);
glVertex3f (0.02, -0.19, 0.0);

glVertex3f (0.02, -0.19, 0.0);
glVertex3f (-0.13, -0.19, 0.0);

glVertex3f (-0.13, -0.19, 0.0);
glVertex3f (-0.13, -0.27, 0.0);

glEnd ();
//jendelatengahataskiri2
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.13, -0.18, 0.0);
glVertex3f (0.02, -0.18, 0.0);

glVertex3f (0.02, -0.18, 0.0);
glVertex3f (0.02, -0.10, 0.0);

glVertex3f (0.02, -0.10, 0.0);
glVertex3f (-0.13, -0.10, 0.0);

glVertex3f (-0.13, -0.10, 0.0);
glVertex3f (-0.13, -0.18, 0.0);

glEnd ();

//jendelatengahataskanan
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (0.05, -0.27, 0.0);
glVertex3f (0.20, -0.27, 0.0);

glVertex3f (0.20, -0.27, 0.0);
glVertex3f (0.20, -0.19, 0.0);

glVertex3f (0.20, -0.19, 0.0);
glVertex3f (0.05, -0.19, 0.0);

glVertex3f (0.05, -0.17, 0.0);
glVertex3f (0.05, -0.25, 0.0);

glEnd ();

//jendelatengahbawahkanan
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (0.05, -0.18, 0.0);
glVertex3f (0.20, -0.18, 0.0);

glVertex3f (0.20, -0.18, 0.0);
glVertex3f (0.20, -0.10, 0.0);

glVertex3f (0.20, -0.10, 0.0);
glVertex3f (0.05, -0.10, 0.0);

glVertex3f (0.05, -0.10, 0.0);
glVertex3f (0.05, -0.18, 0.0);

glEnd ();

//pintutengahkiri
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.13, -0.65, 0.0);
glVertex3f (0.02, -0.65, 0.0);

glVertex3f (0.02, -0.65, 0.0);
glVertex3f (0.02, -0.37, 0.0);

glVertex3f (0.02, -0.37, 0.0);
glVertex3f (-0.13, -0.37, 0.0);

glVertex3f (-0.13, -0.37, 0.0);
glVertex3f (-0.13, -0.65, 0.0);

glEnd ();

//pintutengahkanan
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (0.05, -0.65, 0.0);
glVertex3f (0.20, -0.65, 0.0);

glVertex3f (0.20, -0.65, 0.0);
glVertex3f (0.20, -0.37, 0.0);

glVertex3f (0.20, -0.37, 0.0);
glVertex3f (0.05, -0.37, 0.0);

glVertex3f (0.05, -0.37, 0.0);
glVertex3f (0.05, -0.65, 0.0);

glEnd ();

//hiasgenteng
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.32, 0.15, 0.0);
glVertex3f (0.39, 0.15, 0.0);

glVertex3f (0.39, 0.15, 0.0);
glVertex3f (0.39, 0.24, 0.0);

glVertex3f (0.39, 0.24, 0.0);
glVertex3f (-0.32, 0.24, 0.0);

glVertex3f (-0.32, 0.24, 0.0);
glVertex3f (-0.32, 0.15, 0.0);

glEnd ();

//menaratengah
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.12, 0.27, 0.0);
glVertex3f (0.18, 0.27, 0.0);

glVertex3f (0.18, 0.27, 0.0);
glVertex3f (0.18, 0.24, 0.0);

glVertex3f (0.18, 0.24, 0.0);
glVertex3f (-0.12, 0.24, 0.0);

glVertex3f (-0.12, 0.24, 0.0);
glVertex3f (-0.12, 0.27, 0.0);

glEnd ();

//menaratengahatas
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.02, 0.47, 0.0);
glVertex3f (0.08, 0.47, 0.0);

glVertex3f (0.08, 0.47, 0.0);
glVertex3f (0.08, 0.24, 0.0);

glVertex3f (0.08, 0.24, 0.0);
glVertex3f (-0.02, 0.24, 0.0);

glVertex3f (-0.02, 0.24, 0.0);
glVertex3f (-0.02, 0.47, 0.0);

glEnd ();

// atapujungpintu
glPushMatrix ();

glLineWidth (2.0f);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.21, -0.07, 0.0);
glVertex3f (0.27, -0.07, 0.0);

glVertex3f (0.27, -0.01, 0.0);
glVertex3f (0.17, 0.15, 0.0);

glVertex3f (0.17, 0.15, 0.0);
glVertex3f (-0.11, 0.15, 0.0);

glVertex3f (-0.11, 0.15, 0.0);
glVertex3f (-0.21, -0.01, 0.0);

glEnd ();

// atapujungpintu2
glPushMatrix ();

glLineWidth (2.0f);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (-0.21, -0.00, 0.0);
glVertex3f (0.27, -0.00, 0.0);

glVertex3f (0.27, 0.06, 0.0);
glVertex3f (0.17, 0.22, 0.0);

glVertex3f (0.17, 0.22, 0.0);
glVertex3f (-0.11, 0.22, 0.0);

glVertex3f (-0.11, 0.22, 0.0);
glVertex3f (-0.21, 0.06, 0.0);

glEnd ();

// atapujungmenara
glPushMatrix ();

glLineWidth (2.0f);
glBegin (GL_POLYGON);
glColor3f (0.3, 0.3, 0.3);

glVertex3f (-0.03, 0.30, 0.0);
glVertex3f (0.09, 0.30, 0.0);

glVertex3f (0.09, 0.36, 0.0);
glVertex3f (0.07, 0.52, 0.0);

glVertex3f (0.07, 0.52, 0.0);
glVertex3f (-0.01, 0.52, 0.0);

glVertex3f (-0.01, 0.52, 0.0);
glVertex3f (-0.03, 0.36, 0.0);

glEnd ();

// atapujungmenarapol
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (0.0, 0.0, 0.0);

glVertex3f (0.02, 0.52, 0.0);
glVertex3f (0.04, 0.52, 0.0);

glVertex3f (0.04, 0.52, 0.0);
glVertex3f (0.04, 0.65, 0.0);

glVertex3f (0.04, 0.65, 0.0);
glVertex3f (0.02, 0.65, 0.0);

glVertex3f (0.02, 0.65, 0.0);
glVertex3f (0.02, 0.52, 0.0);

glEnd ();

//jendelagentengkiri1
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.75, 0.00, 0.0);
glVertex3f (-0.66, 0.00, 0.0);

glVertex3f (-0.66, 0.00, 0.0);
glVertex3f (-0.66, 0.07, 0.0);

glVertex3f (-0.66, 0.07, 0.0);
glVertex3f (-0.75, 0.07, 0.0);

glVertex3f (-0.75, 0.07, 0.0);
glVertex3f (-0.75, 0.00, 0.0);

glEnd ();

//jendelagentengkiri2
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.55, 0.00, 0.0);
glVertex3f (-0.46, 0.00, 0.0);

glVertex3f (-0.46, 0.00, 0.0);
glVertex3f (-0.46, 0.07, 0.0);

glVertex3f (-0.46, 0.07, 0.0);
glVertex3f (-0.55, 0.07, 0.0);

glVertex3f (-0.55, 0.07, 0.0);
glVertex3f (-0.55, 0.00, 0.0);

glEnd ();

//jendelagentengkiri3
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (-0.35, 0.00, 0.0);
glVertex3f (-0.26, 0.00, 0.0);

glVertex3f (-0.26, 0.00, 0.0);
glVertex3f (-0.26, 0.07, 0.0);

glVertex3f (-0.26, 0.07, 0.0);
glVertex3f (-0.35, 0.07, 0.0);

glVertex3f (-0.35, 0.07, 0.0);
glVertex3f (-0.35, 0.00, 0.0);

glEnd ();

//jendelagentengkanan1
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.38, 0.00, 0.0);
glVertex3f (0.29, 0.00, 0.0);

glVertex3f (0.29, 0.00, 0.0);
glVertex3f (0.29, 0.07, 0.0);

glVertex3f (0.29, 0.07, 0.0);
glVertex3f (0.38, 0.07, 0.0);

glVertex3f (0.38, 0.07, 0.0);
glVertex3f (0.38, 0.00, 0.0);

glEnd ();

//jendelagentengkanan2
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.58, 0.00, 0.0);
glVertex3f (0.49, 0.00, 0.0);

glVertex3f (0.49, 0.00, 0.0);
glVertex3f (0.49, 0.07, 0.0);

glVertex3f (0.49, 0.07, 0.0);
glVertex3f (0.58, 0.07, 0.0);

glVertex3f (0.58, 0.07, 0.0);
glVertex3f (0.58, 0.00, 0.0);

glEnd ();

//jendelagentengkanan3
glPushMatrix ();
glLineWidth (1.9f);
glBegin (GL_LINES);
glBegin (GL_POLYGON);
glColor3f (1.0, 1.0, 1.0);

glVertex3f (0.78, 0.00, 0.0);
glVertex3f (0.69, 0.00, 0.0);

glVertex3f (0.69, 0.00, 0.0);
glVertex3f (0.69, 0.07, 0.0);

glVertex3f (0.69, 0.07, 0.0);
glVertex3f (0.78, 0.07, 0.0);

glVertex3f (0.78, 0.07, 0.0);
glVertex3f (0.78, 0.00, 0.0);

glEnd ();

   glFlush();

}

void init(){
     glClearColor(0.7, 0.7, 0.7, 0.7);//definisiin warna clear atau background

     glMatrixMode(GL_PROJECTION);

     glLoadIdentity ();

     gluOrtho2D(-1.0,1.0,-1.0,1.0);//MENENTUKAN UKURAN KANVAS
     //           k   k    b   a
     glMatrixMode(GL_MODELVIEW);
}

int main(int argc, char **argv){
    glutInit(&argc,argv);
    glutInitWindowSize(800,400);
    glutInitWindowPosition(300,300);//jarak windows dari tepi monitor

    glutCreateWindow("Gedung Fatahillah jkt");
    glutDisplayFunc(display);
    init();
    glutMainLoop();//mulai render
    return 0;
}