NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include<Windows.h>
#include<GLgl.h>
#include<GLglu.h>
#include<GLglut.h> //diger iki dosyanin icerigini barindirir

#include<iostream>
#include <fstream>
#include<string>
#include<sstream>
#include <math.h>

GLfloat red = 0.0, blue = 0.0, green = 0.0;

using namespace std;

#define KIRMIZI 1
#define YESIL 2
#define MAVI 3
#define PEMBE 4

void Cizgiler() {
GLfloat BaskentLogoKoordinatlar[4][8][2]
= {
{ { 0.0,280.0 },{ 138.907,145.885 },{ 98.5551,105.542 },{ 39.9941,164.0 },{ 0.0,0.0 },{ -39.9938,160.0 },{ -97.4877,108.5 },{ -136.482,147.5 } },
{ { 280.0,0.0 },{ 145.885,-138.907 },{ 105.542,-98.5551 },{ 164,-39.9941 },{ 0.0,0.0 },{ 160.0,39.9937 },{ 108.5,97.4877 },{ 147.5,136.482 } },
{ { 0.0,-280.0 },{ -138.907,-145.885 },{ -98.5551,-105.542 },{ -39.9941,-164.0 },{ 0.0,0.0 },{ 39.9937, -160.0 },{ 97.4876, -108.5 },{ 136.482, -147.5 } },
{ { -280.0,0.0 },{ -145.885,138.907 },{ -105.541,98.5551 },{ -164,39.9941 },{ 0.0,0.0 },{ -160.0,-39.9937 },{ -108.5,-97.4876 },{ -147.5,-136.482 } }
};
glColor3f(red, green, blue);
for (int j = 0; j < 4; j++)
{
glBegin(GL_POLYGON);
for (int i = 0; i<8; i++)
{
int a = i + (j * 8);
glVertex2fv(BaskentLogoKoordinatlar[j][i]);

}
glEnd();//Cizgi cizdirme komut blogu bitti
}
glFlush();//Bufferı bosaltir
}

void init() {

glMatrixMode(GL_PROJECTION);

glLoadIdentity(); //reset islemi

gluOrtho2D(-400, 400, -400, 400);

glColor3f(0.0, 0.0, 0.0); //siyah renkli cizim

//glLineWidth(3); //Cizgi kalinligi
}


void Renkler(int option) {
switch (option)
{
case KIRMIZI:
red = 1.0;
green = 0.0;
blue = 0.0;
break;

case YESIL:
red = 0.0;
green = 1.0;
blue = 0.0;
break;

case MAVI:
red = 0.0;
green = 0.0;
blue = 1.0;
break;

case PEMBE:
red = 1.0;
green = 0.0;
blue = 1.0;
break;

default:
break;
}
Cizgiler();
}

void createGLUTMenus()
{
glutCreateMenu(Renkler);
//menuye menu elemanlarını ekledim
glutAddMenuEntry("KIRMIZI BOYA", KIRMIZI);
glutAddMenuEntry("MAVİ BOYA", MAVI);
glutAddMenuEntry("YESİL BOYA", YESIL);
glutAddMenuEntry("PEMBE BOYA", PEMBE);
glutAttachMenu(GLUT_RIGHT_BUTTON); //Yaratılan menu sag fare tusuna atadık
}



int main(int argc, char **argv)
{
glutInit(&argc, argv); // mainden gelen parametreler ile initilization

glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA); //goruntuleme secenekleri

glutInitWindowPosition(100, 100);//cizim penceresinin sol ustten mesafesi

glutInitWindowSize(800, 800); //cizim penceresinin ekran boyutu

glutCreateWindow("BASKENT UNIVERSITESI LOGOSU - 2017 / ANKARA"); //pencere olusturma ve isim verme

init(); //Initialization icin

glClearColor(1.0, 1.0, 1.0, 1.0); //pencere icini beyaz ile doldur

glClear(GL_COLOR_BUFFER_BIT); //pencere icini temizlerken beyaz ile temizler

glutDisplayFunc(Cizgiler); //Yapilacak fonksiyon cagiriliyor
createGLUTMenus();

glutMainLoop(); //her seyi ekranda göster ve bekle

return 0;
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.