<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Topics tagged with lines]]></title><description><![CDATA[A list of topics that have been tagged with lines]]></description><link>https://community.secnto.com//tags/lines</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 23:52:50 GMT</lastBuildDate><atom:link href="https://community.secnto.com//tags/lines.rss" rel="self" type="application/rss+xml"/><pubDate>Invalid Date</pubDate><ttl>60</ttl><item><title><![CDATA[CS602 Assignment 2 Solution and Discussion]]></title><description><![CDATA[Solution:
Program:-
#include&lt;stdio.h&gt;
#include&lt;graphics.h&gt;
#include&lt;conio.h&gt;
#include&lt;stdlib.h&gt;
int main()
{
 	int gd,gm,n,*x,i,k=0;
	//window coordinates int wx1=220,wy1=140,wx2=420,wy2=140,wx3=420,wy3=340,wx4=220,wy4=340;
	int w[]={220,140,420,140,420,340,220,340,220,140};//array for drawing window
	detectgraph(&amp;gd,&amp;gm); 
	initgraph(&amp;gd,&amp;gm,"c:\\turboc3\\bgi"); //initializing graphics
	printf("Window:-");
	setcolor(RED); //red colored window
	drawpoly(5,w); //window drawn
	printf("Enter the no. of vertices of polygon: ");
	scanf("%d",&amp;n);
	x = malloc(n*2+1);
	printf("Enter the coordinates of points:\n");
	k=0;
	for(i=0;i&lt;n*2;i+=2) //reading vertices of polygon
	{
		printf("(x%d,y%d): ",k,k);
		scanf("%d,%d",&amp;x[i],&amp;x[i+1]);
		k++;
	}
	x[n*2]=x[0]; //assigning the coordinates of first vertex to last additional vertex for drawpoly method.
	x[n*2+1]=x[1];
	setcolor(WHITE);
	drawpoly(n+1,x);
	printf("\nPress a button to clip a polygon..");
	getch();
 	setcolor(RED);
 	drawpoly(5,w);
 	setfillstyle(SOLID_FILL,BLACK);
 	floodfill(2,2,RED);
 	gotoxy(1,1); //bringing cursor at starting position
 	printf("\nThis is the clipped polygon..");
 	getch();

 	cleardevice();
 	closegraph();
 	return 0;
}


]]></description><link>https://community.secnto.com//topic/2180/cs602-assignment-2-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/2180/cs602-assignment-2-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS602 Assignment 1 Solution and Discussion]]></title><description><![CDATA[@zaasmi said in CS602 Assignment 1 Solution and Discussion:

Question 1) Write a program in Dev C++ to draw a circle. Also, use the flood fill algorithm to fill the circle with different lines of red color.  The output of your program should like the below image:

Solution:
// C Implementation for setfillstyle 
// and floodfill function 
#include &lt;graphics.h&gt; 

// driver code 
int main() 
{ 
	// gm is Graphics mode which is 
	// a computer display mode that 
	// generates image using pixels. 
	// DETECT is a macro defined in 
	// "graphics.h" header file 
	int gd = DETECT, gm; 
	
	// initgraph initializes the 
	// graphics system by loading 
	// a graphics driver from disk 
	initgraph(&amp;gd, &amp;gm, " "); 

	// center and radius of circle 
	int x_circle = 250; 
	int y_circle = 250; 
	int radius=100; 
	
	// setting border color 
	int border_color = WHITE; 
	
	
	// set color and pattern 
	setfillstyle(HATCH_FILL,RED); 
	
	// x and y is a position and 
	// radius is for radius of circle 
	circle(x_circle,y_circle,radius); 
	
	// fill the color at location 
	// (x, y) with in border color 
	floodfill(x_circle,y_circle,border_color); 

	getch(); 
	
	// closegraph function closes the 
	// graphics mode and deallocates 
	// all memory allocated by 
	// graphics system 
	closegraph(); 
	
	return 0; 
}


]]></description><link>https://community.secnto.com//topic/2179/cs602-assignment-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/2179/cs602-assignment-1-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>