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

www.vustudents.ning.com

 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

# Assignment No. 02 Semester: Fall 2015 CS602: Computer Graphics

+ 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?

Views: 3662

.

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

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

Attachments:

### Replies to This Discussion

is main error ha?

Successfully Completed 90% assignment :) only last part is lefting ;)

then plz  tel me  about solution

wheen  yu complt then plzzzzz  give me yur solution

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<stdlib.h>
#include<math.h>
void boundary_fill(int x,int y,int f,int b);

int main()
{
initwindow(600,600);
int x,y,n,i;
int gd=DETECT,gm;
initgraph(&gd,&gm," ");
setcolor(WHITE);

settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);
outtextxy(10, 10, "Welcome to Graphics Programming");
outtextxy(10, 30, "My VU-ID is BS130201411");
line(0,60,getmaxx(),60);
/*- draw object -*/

line (70,70,200,70);
line (200,70,200,300);
line (200,300,70,300);
line (70,300,70,70);

/*- set seed point */
setcolor(RED);
boundary_fill(71,71,4,15);
boundary_fill(71,71,4,15);

getch();
closegraph();
return 0;
}
void boundary_fill(int x,int y,int f,int b)
{
if(getpixel(x,y)!=b && getpixel(x,y)!=f)
{

putpixel(x,y,f);
delay(10);
boundary_fill(x+1,y-1,f,b);

boundary_fill(x+1,y+1,f,b);
boundary_fill(x-1,y-1,f,b);
boundary_fill(x-1,y+1,f,b);

}
}

See the attached file given below:

Attachments:

error

Attachments:
Day DON GA WAIT :) Just the last step ..

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<stdlib.h>
#include<math.h>
void boundary_fill(int x,int y,int f,int b);

int main()
{
int x,y,n,i;
int gd=DETECT,gm;
initgraph(&gd,&gm," ");
setcolor(WHITE);
floodfill(300, 180, BLACK);

settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);
outtextxy(10, 10, "Welcome to Graphics Programming");
outtextxy(10, 30, "My VU-ID is BC130401285");
line(0,60,getmaxx(),60);
/*- draw object -*/

line (70,70,200,70);
line (200,70,200,300);
line (200,300,70,300);
line (70,300,70,70);

/*- set seed point */

boundary_fill(71,71,4,15);

getch();
closegraph();
return 0;

}
void boundary_fill(int x,int y,int f,int b)
{
if(getpixel(x,y)!=f && getpixel(x,y)!=b)
{

putpixel(x,y,f);
delay(0);
boundary_fill(x+1,y-0,f,b);
boundary_fill(x+1,y+0,f,b);
boundary_fill(x-0,y-1,f,b);
boundary_fill(x-0,y+1,f,b);

}
}

there is an issue in this solution if we open the window.exe the filling patron is different then this one. is this solution fine?

how to half fill one side and  second part other fill

Yups At Least Successfuly I developed it :) .. But I will share programme source latter after a lot of changings :) .

This time I can only give you IDEA . That BOUNDARYFILL() is not a part of this programme :) . So Don't use :) .

Attachments:

## Latest Activity

+***piya o ry piya***+ posted a discussion

### neend solution of gdb che201

2 minutes ago
Iqra Khan left a comment for Mouzma Haider
3 minutes ago
Iqra Khan left a comment for Mouzma Haider
3 minutes ago
10 minutes ago
+ Տehɑr Ƙհɑղ + posted a discussion

### May Allah save us from Corona virus Aameen

17 minutes ago
Farheen Khalid joined + M.Tariq Malik's group

### MTH634 Topology

20 minutes ago
Iqra Khan and Mouzma Haider are now friends
23 minutes ago
Maria Gondal, Umair Awais Qureshi, munazza anees and 1 more joined Virtual University of Pakistan
36 minutes ago
Ateeqa posted discussions
41 minutes ago
48 minutes ago
imran and Rida Batool joined + M.Tariq Malik's group

### ENG101 English Comprehension

48 minutes ago
+ ! ! ! ! Mobi updated their profile
50 minutes ago

1

2

3