Thanks for visit http://randylio.blogspot.com Or http://rlpower.cz.cc
English French German Spain Italian Dutch

Russian Brazil Japanese Korean Arabic Chinese Simplified
Translate Widget by Google

26/01/11

Listing membuat DNA dengan Pelles C



LISTING



#include

while( mRunning )
    {
        //
float i;

gluLookAt(0,50,100,0,70,0,0,1,0);
glRotatef(i,0,1,0);
//kubus pertama
//depan
glBegin(GL_QUADS);
glColor3f(1,0,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0); i+=1;
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-6,0,0);
glVertex3f(-6,2,0);
glVertex3f(-4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,-2);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-4,0,0);
glVertex3f(-4,0,-2);
glVertex3f(-4,2,-2);
glVertex3f(-4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(1,1,0);
glVertex3f(-6,0,0);
glVertex3f(-6,0,-2);
glVertex3f(-6,2,-2);
glVertex3f(-6,2,0);
glEnd();
//kubus k-2
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(6,0,0);
glVertex3f(6,2,0);
glVertex3f(4,2,0);
glEnd();
//belakang
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,-2);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(4,2,-2);
glEnd();
//samping
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(4,0,0);
glVertex3f(4,0,-2);
glVertex3f(4,2,-2);
glVertex3f(4,2,0);
glEnd();
glBegin(GL_QUADS);
glColor3f(0,1,0);
glVertex3f(6,0,0);
glVertex3f(6,0,-2);
glVertex3f(6,2,-2);
glVertex3f(6,2,0);
glEnd();
//garis
glBegin(GL_LINES);
glColor3f(1,0,0);
glVertex3f(4,1,-1);
glVertex3f(-4,1,-1);
glEnd();
glTranslatef(0,5,0);
glRotatef(20,0,10,0);
if(i==360){i=1;};

RL-power
 

RL.power | CLEAR & FAST Copyright © 2010 LKart Theme is Designed by Lasantha