We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS602- Computer Graphics Assignment No.05 SEMESTER Spring 2013 Total Marks:20 Due Date: 03/07/201 3

Assignment No. 05
SEMESTER Spring2013
CS602- Computer Graphics

 

Total Marks: 20

 

Due Date: 03/07/2013

Instructions

Please read the following instructions carefully before solving & submitting assignment:

It should be clear that your assignment will not get any credit (zero marks) if:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is full or partially copied (from other student or ditto copy from handouts or internet).
  • Student ID is not mentioned in the assignment File or name of file is other than student ID.

 

Uploading instructions

Your Submission must include:

 

  1. Dev cpp project file with .dev extension.
  2. Code file with .cpp extension.

Objective

The objective of this assignment is

 

  • To make you understand the concept and application of opengl library.
  • To give you practical exercise of an opengl library.

 

Important Requirements and Instructions:

  1. You are not allowed to copy it from internet. In that case no marks shall be awarded.
  2. Same assignment of two or more students shall be considered cheating case and they will get straight zero marks.
  3. Assignment last date is 03/07/2013.Any lame excuses will not be accepted. 
  4. We will not accept assignment through email in any case. Be careful.

 

 

 

For any query about the assignment, contact at cs602@vu.edu.pk

GOOD LUCK

 

 

 

                                                                                                              

 

Question :                                                                                                                 //20marks

 

Write a program in C/C++ to draw the cube on the screen using Opengl library. See the “Assignment5Demo.wmv” along with the assignment file. You have to draw the cube on screen. By pressing left arrow key on the keyboard the cube should rotate anti clockwise while on pressing right key the cube should rotate clockwise.  Follow the instructions given below.

 

Requirements:

  • Front part of the cube should be red in color.
  • Right part of the cube should be pink in color.
  • Left part of the cube should be green in color.
  • Back side of the cube should be Blue in color.

 

Note:   You are required to fulfill all the requirements given in the demo file “Assignment5Demo.mp4”. Also note the changing color scheme of cube at each step.

 

Note: You are not required to draw buttons and other text boxes on the screen these are only for your understanding.

Lectures Covered: This assignment covers Lecture # 26-33

Deadline

Your assignment must be uploaded/submitted at or before 03/07/2013.      




+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 2000

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

#include <GL/glut.h>

int main()

{

    glutCreateWindow( "first graphics window" );

}

 

glutCreateWindow

glutCreateWindow creates a top-level window.

 

Usage

int glutCreateWindow(char *name);

name:

ASCII character string for use as window name.

 

Description: glutCreateWindow creates a top-level window. The name will be provided to the window system as the window's name. The intent is that the window system will label the window with the name.

 

Implicitly, the current window is set to the newly created window. Each created window has a unique associated OpenGL context. State changes to a window's associated OpenGL context can be done immediately after the window is created.

The display state of a window is initially for the window to be shown. But the window's display state is not actually acted upon until glutMainLoop is entered. This means until glutMainLoop is called, rendering to a created window is ineffective because the window cannot yet be displayed.

 

The value returned is a unique small integer identifier for the window. The range of allocated identifiers starts at one. This window identifier can be used when calling glutSetWindow.

X Implementation Notes

The proper X Inter-Client Communication Conventions Manual (ICCCM) top-level properties are established. The  WM_COMMAND property that lists the command line used to invoke the GLUT program is only established for the first window created.

 

 

This is the simple program that we have written so far. Now we will use more features of “glut” library.

 

#include <GL/glut.h>

int main()

{

    //Set up the OpenGL rendering context.

    glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );

 

    //Create a window and set its width and height.

    glutCreateWindow( "Deform" );

    glutReshapeWindow( 640, 480 );

 

    //The keyboard function gets called whenever we hit a key.

    glutKeyboardFunc( keyboard );

 

    //The display function gets called whenever the window

    //requires an update or when we explicitly call

    glutDisplayFunc( display );

 

    //The reshape function gets called whenever the window changes

    //shape.

    glutReshapeFunc( reshape );

 

    // The idle function gets called when there are no window-

    // events to process.

    glutIdleFunc( idle );

 

    //Get the ball rolling!

    glutMainLoop();

}




what is the purpose of this glut package???


GLUT is the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL Programming.


I missed 4th assignment. I am out of touch from this course for aeons time. please tell me how to make this assignment. if you tell step by step i will be thankful to you.

mujy coding nai ati 

mujhy b coding ni ati

plz upload this assignemnt 2 miss ho gyi hen phle hi meri....hurry up uplaod this solution

any one jis ka cube ben gaia ho .... ?

yar mera cube ben gaia hey and ghooma b lia

but now koi banda jo meray sath nichay buttons main kam kerwa skay 

send me ur cube.

RSS

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.