Time Table

Good Essays
2013
COMSATS Institute Of Information And Technology Lahore, Pakistan

2013
COMSATS Institute Of Information And Technology Lahore, Pakistan

Waheed Abbas
DDP-BCS-FA11-088
Section “B”

Submitted To: Miss Nosheen Majeed

Waheed Abbas
DDP-BCS-FA11-088
Section “B”

Submitted To: Miss Nosheen Majeed

1. Draw a triangle strip with different colors for each triangle.
#include<GL\glut.h>
void Display(){ glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_TRIANGLE_STRIP); glColor3f(255,255,0);//yellow glVertex2f(-0.5,0.9); glVertex2f(0.5,0.6); glVertex2f(-0.5,0.3); glColor3f(255,0,255);//pink glVertex2f(0.5,0.0); glColor3f(255,0,0);//green glVertex2f(-0.5,-0.3); glColor3f(0,255,255); glVertex2f(0.5,-0.6); glColor3f(0,255,0); glVertex2f(-0.5,-0.9); glEnd(); glFlush();
}

void main(int argc, char** argv){ glutInit(&argc, argv); glutInitWindowPosition(0,0); glutInitWindowSize(400,600); glutCreateWindow("My Program!"); glutDisplayFunc(Display); glClearColor(1.0,1.0,1.0,0.0); glutMainLoop();
}

2. Draw a circle with the help of triangle fan.
#include<GL\glut.h>
#include<math.h> void Display(){ int section=100; float radius=1.0; float twoPi=2.0*3.14; glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_TRIANGLE_FAN); glVertex2f(0.0,0.0); for(int i=0; i<=section; i++){ glVertex2f(radius*cos(i*twoPi/section),radius*sin(i*twoPi/section)); if(i%8==0) glColor3f(0.0,0.0,0.0); if(i%8==1) glColor3f(0.0,0.0,1.0); if(i%8==2) glColor3f(0.0,1.0,0.0); if(i%8==3) glColor3f(0.0,1.0,1.0); if(i%8==4) glColor3f(1.0,0.0,0.0); if(i%8==5) glColor3f(1.0,0.0,1.0); if(i%8==6) glColor3f(1.0,1.0,0.0); if(i%8==7) glColor3f(1.0,1.0,1.0);
}
glEnd(); glFlush(); }

void main(int argc, char** argv){ glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowPosition(0,0); glutInitWindowSize(600,600);

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Time Table

    • 854 Words
    • 4 Pages

    MAHARASHTRA STATE BOARD OF SECONDARY AND HIGHER SECONDARY EDUCATION---------- DIVISIONAL BOARD --------- TIME TABLE FOR SECONDARY SCHOOL CERTIFICATE EXAMINATION (STD X) MARCH, 2013 ||||| The Secondary School Certificate Examination will commence on and from Saturday 2nd March, 2013 and will be conducted in the following order||||| ||FIRST HALF ||SECOND HALF| DAY AND DATE|TIME |SUBJECT WITH INDEX NO.|TIME|SUBJECT WITH INDEX NO.| Saturday 02nd March, 2013|11.00a.m. to2.00 p.m.|FIRST LANGUAGE (प्रथम भाषा)…

    • 854 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Time Tables

    • 473 Words
    • 2 Pages

    Ramos Math 217 June 27, 2008 The name of the article is Mastering Times Tables with Fun by Dhaval Shrimankar. This article talks about how hard it is to learn the time tables and uses the abacus as the best tool to learn the time tables. It explains how pictorial memory is certainly better than rote memorization and with the use of the abacus it is not only proved by test to be effective but also a fun way to learn the time tables according to Shrimankar. The facts stated in this article are backed…

    • 473 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Time Table

    • 1425 Words
    • 6 Pages

    we propose a new notion of privacy called “closeness.” We first present the base model closeness, which requires that the distribution of a sensitive attribute in any equivalence class is close to the distribution of the attribute in the overall table (i.e., the distance between the two distributions should be no more than a threshold t). We then propose a more flexible privacy model called closeness that offers higher utility. We describe our desiderata for designing a distance measure between…

    • 1425 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    Time Table

    • 2774 Words
    • 12 Pages

    Business Studies Diploma in Business Level 1 & Level 2 HELP Bachelor of Business (HONS) Year 1 HELP Bachelor of Econnomics (HONS) Year 1 HELP Bachelor of Management (HONS) Year 1 Semester 1, 2013 - Intake 67 21 January 2013 - 3 May 2013 TIME 8.00 DAY 9.00 10.00 8.30 9.30 11.00 10.30 ACC 103 - AL1 M O N D A Y ACC 103 - BL1 Mr Steven Toh KA-A1 Mr Steven Toh ECO101 - AL1 LAW 101 - AL1 Mr K.Chandra 12.00 11.30 KA-A2 Mr Harkiranpal Singh…

    • 2774 Words
    • 12 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Time Table

    • 458 Words
    • 2 Pages

    Marketing Ghajini: Bollywood Biggest Blockbuster What marketing strategies were used to market ghajini? And it’s positioning? Basically, Aamir khan used two types of marketing strategies one is viral and other one is ambuss marketing. In viral marketing he thought holistically and launched his personal website to attract his fans and increase the awareness of his movie to make it blockbuster movie they did marketing through different websites which contains the title of find ghajini, remember…

    • 458 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    time table

    • 5550 Words
    • 23 Pages

    DATE CODE/COURSE VENUE LECTURER/GROUP 29/04/2013 MID2153 - Radiographic Technique And Positioning 3 HS - Edwin Abdurakman MONDAY MID2213 - Radiographic Technique And Positioning 4 HS - SAWAL MARSAIT MLS3154 - Clinical Biochemistry HS - ASMA BT HARUN 09.00 - 12.00 PFS1313 - Principles Of Finance - G1 PFS1313 - Principles Of Finance - G3 MG - SYLIVIA WONG PEI PEI PCH MG - UMMI RAIDA AWANG ZAKI PFS1313 - Principles Of Finance - G4 ?? PFS3273 -…

    • 5550 Words
    • 23 Pages
    Satisfactory Essays
  • Good Essays

    time table

    • 29576 Words
    • 119 Pages

    PROTECTING CHILDREN FROM VIOLENCE IN SPORT a review with a focus on industrialized countries PROTECTING CHILDREN FROM VIOLENCE IN SPORT a review with a focus on industrialized countries The UNICEF Innocenti Research Centre The UNICEF Innocenti Research Centre in Florence, Italy, was established in 1988 to strengthen the research capability of the United Nations Children’s Fund (UNICEF) and to support its advocacy for children worldwide. The Centre (formally known as the International…

    • 29576 Words
    • 119 Pages
    Good Essays
  • Best Essays

    time table

    • 1661 Words
    • 5 Pages

    The airline industry was established many decades ago with the arrival and departure of many airline companies. Although there were not a lot of them, some early entrants still do exist today and are holding a stable position in the market despite the volatility of the airline industry. According to Porter (Thornton, 2011), the airline industry is known to be one of the least profitable industry by companies due to its “high level of rivalry, high bargaining power of the buyer, high level of substitutes…

    • 1661 Words
    • 5 Pages
    Best Essays
  • Powerful Essays

    Time Table Generation

    • 2264 Words
    • 10 Pages

    while, or it may be impossible. This is where genetic algorithms come in to the game. In this article, I assume that you are familiar with the basic concepts of genetic algorithms, and I won't describe them in detail because it has been done so many times before. Background When you make a class schedule, you must take into consideration many requirements (number of professors, students, classes and classrooms, size of classroom, laboratory equipment in classroom, and many others). These requirements…

    • 2264 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    Time Table Chart

    • 396 Words
    • 2 Pages

    “To Do List” Topic | Start time | End time | Pop-Ups | Wake up | 07:00 AM | 07:30 AM | Looking for cold water, it would take 6-10 minutes. Time would cross 07:20 AM then. | Getting clean & fresh | 07:45 AM | 08:15 AM | Mother might ask to buy some breads for breakfast for which it might take me at least 15 minutes. Time would then cross 08:30 AM when I come back. | Having breakfast | 08:35 AM | 08:55 AM | Reading newspaper until its 09:00 AM. | Getting ready to go to BAC | 09:10 AM…

    • 396 Words
    • 2 Pages
    Satisfactory Essays