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

    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
  • 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
  • Good Essays

    Pain is an important sensation that alerts to a threatening condition in the body’s tissues.1 Like hunger or thirst, it is a motivational somatic state that drives appropriate behavioral responses, but chronic pathological pain can also completely dominate attention and consciousness and cause intolerable suffering.2 Our knowledge of the representation of pain in the peripheral nerves, the spinal cord, and the brain is increasing, and become aware that many neurochemicals involved and the critical interactions with other systems, such as the thermoregulatory, sympathetic and immune systems, that make pain an integrated physiological phenomenon.3-5…

    • 582 Words
    • 3 Pages
    Good 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
  • 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
  • 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

    that the contents will be complete or accurate or up to date. The accuracy of any…

    • 16081 Words
    • 87 Pages
    Powerful 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

    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
  • 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
  • Powerful Essays

    Cipd 3pdl

    • 1030 Words
    • 5 Pages

    Malcolm Knowles renowned for his work on adult learning (andragogy) identified the following principles of developing adults:…

    • 1030 Words
    • 5 Pages
    Powerful 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

    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
  • 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