Preview

Time Table

Good Essays
Open Document
Open Document
518 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Time Table
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

    The Unit Circle Projec

    • 308 Words
    • 2 Pages

    • Using your medium of choice (no garbage cans, food or glitter, please), create a display of the Unit Circle.…

    • 308 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Squ Time Table

    • 77080 Words
    • 309 Pages

    Crs Title Thesis Omani Wildlife Wond. Prin Animal Science Prin Animal Science Introduc.to Veteri T Introduc.to Veteri T Immunology Immunology Anatomy & Histology Anatomy & Histology Fund. of Nutrition Fund. of Nutrition Reproductive Physiol Reproductive Physiol Vet Haematology Vet Haematology Dairy & Beef Product Dairy & Beef Product Camel Husbandry Camel Husbandry Animal Nutrition Animal Nutrition Veterinary Pathology Veterinary Pathology Lg An Diseases Lg An Diseases Diag. Microbiology Diag. Microbiology Meat Hygiene Lab Animal Rotation…

    • 77080 Words
    • 309 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Time Value

    • 253 Words
    • 2 Pages

    * b. What would be the future value if the interest rate is a compound interest rate?…

    • 253 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    How Does Glfloat Shape

    • 376 Words
    • 2 Pages

    #include "stdafx.h" #include "windows.h" #include "glut.h" #include "gl/GL.h" #include "gl/Glu.h" GLfloat spe_x = 1.0f; GLfloat spe_y = 1.0f; GLfloat spe_z = 1.0f; GLfloat spe_a = 1.0f; GLfloat wall_1 = 1.0f; GLfloat translate_x = 0.6f; GLfloat translate_y = 0.38f; GLfloat translate_z = 0.5f; float jack_radius = 0.1; bool isTrue = false; bool isTrue_r = false; GLfloat rot = 90.0; // Wall void wall(double thickness) { // draw thin wall with top xz-plane, corner at origin glPushMatrix(); glTranslated(0.5, 0.5 * thickness, 0.5); glScaled(1.0, thickness, 1.0); glutSolidCube(1.0); glPopMatrix(); } // table…

    • 376 Words
    • 2 Pages
    Powerful Essays
  • Good Essays

    DIY Hoodie Vest

    • 848 Words
    • 4 Pages

    Draw a construction line from M to H and divide it into 3 equal parts. Label points Nand O.…

    • 848 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Time Managment

    • 362 Words
    • 2 Pages

    Tasks- A LOT main purpose against the U.S military in this war against Native Americans build bridges building schools and hospitals…

    • 362 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Time Line 2

    • 1050 Words
    • 5 Pages

    | Slavery was necessary to southern colonists after the introduction of the cotton gin. The cotton gin was a way to make cotton worth a lot but the machine required a lot of manual labor which brought along the plantation system. Prior to the cotton gin slave trade was done most by the New England colonies, this was called “Triangle Trade (Wikipedia, n.d.).”…

    • 1050 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    Time Management Plan

    • 913 Words
    • 5 Pages

    Do all my required tasks, as well as others I don’t have to do and I can get a raise in 3 months.…

    • 913 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    The time management worksheet allows me to focus on available time in order to meet deadlines and have assignments completed in a timely manner. In order to experience success throughout my academic career I will need to practice managing time wisely.…

    • 211 Words
    • 1 Page
    Good Essays
  • Satisfactory Essays

    “Frequently, students who consider themselves poor writers actually struggle more with time-management than word usage.”(Chambers, 2015). I feel like I have this problem a lot. According to (Strom,2016) students in high school feel like the are under the gun a lot more than before. I feel like this doesn’t just apply to those student . I feel all students these days feel like that.The best thing I found to help me fix the problem is to make a scheduled.…

    • 273 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Time Tables

    • 473 Words
    • 2 Pages

    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 by the results conducted by a group of children, and it concluded that the group of children that used the abacus were free of the phobia created by rote memorization and were less confused than the other group.…

    • 473 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Being on my school's Yearbook Committee, I get to show my creativity through photography. I enjoy being able to take pictures of my friends, classmates, and teachers. For me, it is a break from the everyday normal of going to classes and taking notes and studying for tests. Photography is a creative outlet that I now enjoy and will be a life long passion of mine. However, being on the Yearbook Committee is not all about taking pretty pictures, it's also about working with others to achieve a common goal- which is finishing the yearbook on time. To finish the yearbook on time it takes many hours of uploading, scanning, and editing and an average meeting can consist of 2-5 members. When our designated teacher has to be away for a meeting, I am…

    • 181 Words
    • 1 Page
    Satisfactory Essays
  • Powerful Essays

    Time Management Workbook

    • 2718 Words
    • 11 Pages

    I am most interested in learning the skill of flexicuting. Being able to use the skill of flexicuting will help me with the multiple roles of mother, teacher, wife, friend, etc. on an everyday basis. I often need a plan b and to be ready for the unexpected because I never know what I will deal with on a day to day basis.…

    • 2718 Words
    • 11 Pages
    Powerful Essays
  • Satisfactory Essays

    Managing Time Analysis

    • 380 Words
    • 2 Pages

    Managing time wisely on the floor and coming back to a patient room when initially promised is important because patients really take our word seriously. Patients really do appreciate when we come back when we say we are and if we don’t they appreciate when we apologize. Patients feel like they’re being listened to and that we care about them when we hold to our word and take care of them accordingly and on time. In the article, it takes about patients’ experience of being hospitalized. Patients are sensitive to the hurried pace of the hospital and they can feel a sense of unimportance when staff members are quick to dismiss them or don’t take the time to really be there in the moment with them. I realized how important time management was when I walked into a patient room later in the day and the first thing she said to me was, “You must be…

    • 380 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Time Management

    • 1048 Words
    • 5 Pages

    Time Management is the control and focus of a person’s actions for the purpose of improving efficiency.…

    • 1048 Words
    • 5 Pages
    Good Essays