@bayu_aji94

mari saling sharing di twitter

Bayu Aji

temukan saya di facebook

Serikat Mahasiswa Indonesia

Embrio Persatuan Serikat Mahasiswa Indonesia ( SMI ) adalah organisasi yang tidak lahir begitu saja, namun SMI mempunyai sejarah yang cukup panjang terutama dalam proses pembangunannya. Diawali sejak akhir tahun 2001.

Manchester City

Manchester City merupakan klub sepak bola asli kota manchester - Inggris

Rabu, 21 Oktober 2015

prak 5

/* Praktikum 05
* Scaling Objek 3D
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <glut.h>
static double xVal=xVal+0.5;
static double yVal=yVal+1.0;
static double zVal=zVal+2.5;
void drawCyl()
{
 GLUquadricObj* cyl;

 glMatrixMode (GL_PROJECTION);
 glLoadIdentity();
 gluPerspective(35.0, 1.0, 1.0, 100.0);
 glMatrixMode (GL_MODELVIEW);
 glLoadIdentity();
 gluLookAt (30.0, 0.0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0);
  //Pendefinisian color
 glScalef(xVal, 1.0, 1.0); // Scaling oleh yVal dalam arah y
 glScalef(1.0, yVal, 1.0); // Scaling oleh yVal dalam arah y
 glScalef(1.0, 1.0, zVal); // Scaling oleh yVal dalam arah y
 glScalef(xVal, yVal, zVal); // Scaling oleh yVal dalam arah y
 cyl = gluNewQuadric();
 gluQuadricDrawStyle(cyl, GLU_LINE);
glColor3f(1.0f, 0.0f, 0.5f);
 glBegin(GL_LINE_LOOP);
 glVertex3f(1.0f, 0.0f, -1.0f);
 glVertex3f(5.0f, 1.0f, 0.0f);
 glVertex3f(3.0f, 4.0f, 0.0f);
 glEnd();


 //glutWireCone(2,4,25,25);
 //gluCylinder(cyl, 1.0, 1.0, , 35, 15);
 glFlush();}
void display(void)
{
 /* clear all pixels */
 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

 drawCyl();
 glFlush ();
}
void init (void)
{
 glClearColor (0.5, 0.5, 0.5, 0.0);

 glEnable(GL_DEPTH_TEST); //enabling z-buffer
 glMatrixMode (GL_PROJECTION);
 glLoadIdentity();
 gluPerspective(35.0, 1.0, 1.0, 100.0);
 glMatrixMode (GL_MODELVIEW);
 glLoadIdentity();
 gluLookAt (30.0, 0.0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0);
}
void keyboard(unsigned char key, int x, int y)
{
 switch (key) {
 case 27:
 exit(0);
 break;
case 97:
 xVal++;
 glutPostRedisplay();
 break;
 case 98:
 yVal++;
 glutPostRedisplay();
 break;
 case 99:
 zVal++;
 glutPostRedisplay();
 break;
 case 100:
 xVal=xVal+0.2;
 yVal=yVal+0.2;
 zVal=zVal+0.2;
 glutPostRedisplay();
 break;
 case 101:
 xVal=xVal++;
 yVal=yVal++;
 zVal=zVal++;
 glutPostRedisplay();
 break;
 }
}
int main(int argc, char** argv)
{
 glutInit(&argc, argv);
 glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
 glutInitWindowSize (600, 600);
 glutInitWindowPosition (100, 100);
 glutCreateWindow ("irhas_12018052_postest");
 init ();
 glutDisplayFunc(display);
 glutKeyboardFunc(keyboard);
 glutMainLoop();
 return 0;
}

Rabu, 07 Oktober 2015

graf lanjut 3

/*Praktikum 03
* Membuat objek 3D dengan OpenGL
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <glut.h>

void drawCubic()
{
GLfloat p=3.0f;
glBegin(GL_QUADS); //
//up
glColor3f(0.0f, 1.0f, 0.0);
glVertex3f(-p, p, p);
glVertex3f(p, p, p);
glVertex3f(p, p, -p);
glVertex3f(-p, p, -p);
//bottom
glColor3f(0.0f, 0.0f, 0.0);
glVertex3f(-p, -p, p);
glVertex3f(p, -p, p);
glVertex3f(p, -p, -p);
glVertex3f(-p, -p, -p);
//right
glColor3f(1.0f, 0.0f, 0.0);
glVertex3f(p, p, p);
glVertex3f(p, p, -p);
glVertex3f(p, -p, -p);
glVertex3f(p, -p, p);
//left
glColor3f(0.0f, 0.0f, 1.0);
glVertex3f(-p, p, p);
glVertex3f(-p, p, -p);
glVertex3f(-p, -p, -p);
glVertex3f(-p, -p, p);
//d
glColor3f(0.0f, 1.0f, 1.0);
glVertex3f(-p, p, p);
glVertex3f(p, p, p);
glVertex3f(p, -p, p);
glVertex3f(-p, -p, p);
//b
glColor3f(1.0f, 1.0f, 1.0);
glVertex3f(-p, p, -p);
glVertex3f(p, p, -p);
glVertex3f(p, -p, -p);
glVertex3f(-p, -p, -p);

glEnd();
}
void display(void)
{
 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

 glColor3f(1.0f, 0.0f, 0.0f); //Defining color
 //glutWireTeapot(3.0);// Creates a Tea Pot
 drawCubic();
 glFlush ();
}
void init (void)
{
 glClearColor (0.5, 0.5, 0.5, 0.0);
 glEnable(GL_DEPTH_TEST); //enabling z-buffer
 glMatrixMode (GL_PROJECTION);
 glLoadIdentity();
 gluPerspective(35.0, 1.0, 1.0, 100.0);
 glMatrixMode (GL_MODELVIEW);
 glLoadIdentity();
 gluLookAt (-10.0, -5.0, -10.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0);
}
int main(int argc, char** argv)
{
 glutInit(&argc, argv);
 glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
 glutInitWindowSize (600, 600);
 glutInitWindowPosition (300, 300);
 glutCreateWindow ("Pamungkas Bayu Aji_12018050_postest");
 init ();
 glutDisplayFunc(display);
 glutMainLoop();
 return 0;
}

Selasa, 10 Februari 2015

cobabbaa

lagi coba tempel

Selasa, 09 Desember 2014

activity diagram


"bayuaji-master.blogspot.com". Diberdayakan oleh Blogger.