We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
+ Link For Assignments, GDBs & Online Quizzes Solution
+ 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.
Assignment No. 04 (Graded)
CS602- Computer Graphics
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:
Your Submission must include:
The objective of this assignment is
o To make you understand the concept and application of Opengl library.
o To give you practical exercise of an Opengl library.
Important Requirements and Instructions:
For any query about the assignment, contact at firstname.lastname@example.org
Answer the following question.
Write a program in C/C++ to draw a circle on the screen using Opengl library. See the Assignment4demo along with the assignment file. You have to draw the circle on screen. The circle should bounce at equal intervals. At each bounce the size of the circle should be reduced. Follow the instructions given below.
· The background color should be red.
· Circle should be hollow
· The outline of the circle should be in white color
· The outline of the circle should be thick
You are required to fulfill all the requirements showed in the demo file “Assignment4demo”.
Lectures Covered: This assignment covers Lecture # 32-36
Your assignment must be uploaded/submitted at or before 07/02/2014.
.+ 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)
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.
Please share your idea here...
Sample OpenGL Program
Transformations in OpenGL rely on the matrix for all mathematical computations. No, not the movie. Concentrate grasshopper. OpenGL has what is known as a matrix stack, which comes in handy for constructing models composed of many simple objects.
The modelview matrix defines the coordinate system that is being used to place and orient objects. It is a 4x4 matrix that is multiplied by vertices and transformations to create a new matrix that reflects the result of any transformations that have been applied to the vertices. When we want to modify the modelview matrix we use the command glMatrixMode(). We define this as
void glMatrixMode(GLenum mode);
Before you call any transformation commands you MUST specify whether you want to modify the modelview matrix or the projection matrix. The argument for modifying the modelview matrix is GL_MODELVIEW. So the complete line would appear as:
Now we will look at translation. Translation allows you to move an object from one location to another within a 3D environment. The functions for this in OpenGL are glTranslatef() and glTranslated(). Here are their descriptions:
void glTranslatef(GLfloat x, GLfloat y, GLfloat z); void glTranslated(GLdouble x, GLdouble y, GLdouble z);
Note that you must pass float types to glTranslatef() and double types to glTranslated(). X, Y, and Z represent the amount of translation on that axis.
Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....
Rotation in OpenGL is accomplished through the glRotate*() function, which is defined as
void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
Now let's take a look at these, and a few others, functions mentioned in a program. The following code is taken from OpenGL Game Programming and is commented by myself. If you have any problems building and using this code, feel free to contact me.
/* Steven Billington January 13, 2003 May 26, 20
meri to kisi b programe main #include<GL/glut.h> directory hi ni show hoti koi is problem k bary main janta hai to plz help me is k liye koi aur cheez to ni add krni
B@ch ap kuch cheeziyan add ni kar rahi ho hon gay is leiy ni show ho rahi
be natural ap wo cheezain bta dain kon kon si krni hain
Please update your idea solution for this assignment so that assignment should be completed before due date in the light of your precious idea.
Thanks for sharing your ideas
glut libraries kasy add krni hain kisi ko pta hai
han kis kis se glut libraries add ni ho rahi muje bato main kar deta hon ye to koi itna mushkil kaam ni hai bacho way