+ Link For Assignments, GDBs & Online Quizzes Solution |
+ Link For Past Papers, Solved MCQs, Short Notes & More |
Assignment No. 02 CS602: Computer Graphics
|
Total Marks: 20
Due Date:9/12/2015 |
|
Instructions Please read the following instructions carefully before submitting assignment: Read and follow the instructions given in document inside the Help folder attached. It should be clear that your assignment will not get any credit if:
Objective The objective of this assignment is to;
Assignment
In this assignment, you are provided with a small startup code attached with this assignment in folder “Startup_Code”. Your job is to slightly modify this code as desired in this assignment. First, you need to understand the working of the given code and execute it in Dev-C++. This program essentially draws some text on screen with a line and a rectangle on screen as shown in following screenshot. We refer to the Rectangle as “Window” that is open.
Initially, you need to open Assigment2.dev project file in Dev-C++. After successful compilation and execution, you will see the output. Your Task Your task is to add new code that fill this rectangle with “Red color” in a way using “boundary fill algorithm” that it appears that first left side of window is closed and then the right side as shown in “Window.exe”. To show the window closing slowly, you need add the “delay” function. This simply requires only few lines of code to modify the x and y coordinates with reference to boundary. You shall add your code in the areas indicated with comments “add your code here”. Screenshot of the desired output:
Submission You are required to submit your solution through LMS in zip format containing two files.
|
Tags:
+ 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.
AOA! Dear fellows Share your valuable Ideas ... Early Posts will b highly Solicited ...
dear how we can add red color in our code
plz help
YOu need to use the setcolor(RED) property after declaring integers in your boundary_Fill function
Any one have the idea or not and please let me know i am not able add graphic library in my dev
it just a piece of cake
Any hint ????
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....
#include
#include
#include
void boundfill(int xc,int yc,int r,int b)
{
int cur;
cur=getpixel(xc,yc);
if(cur!=b && cur!=r)
{
putpixel(xc,yc,r);
delay(1);
boundfill(xc+1,yc,r,b);
boundfill(xc-1,yc,r,b);
boundfill(xc,yc+1,r,b);
boundfill(xc,yc-1,r,b);
}
}
main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"..\\bgi");
rectangle(100,100,300,300);
boundfill(105,105,4,WHITE);
getch();
closegraph();
}
yeh kya dy dya :D
bro color kaisy ay ga. plz help us..
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We have been working very hard since 2009 to facilitate in learning Read More. We can't keep up without your support. Donate.
We are user-generated contents site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com Page with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post