<?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 cs602]]></title><description><![CDATA[A list of topics that have been tagged with cs602]]></description><link>https://community.secnto.com//tags/cs602</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 01:20:18 GMT</lastBuildDate><atom:link href="https://community.secnto.com//tags/cs602.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><item><title><![CDATA[CS602 Assignment 3 Solution and Discussion]]></title><description><![CDATA[@wafa-sehar said in CS602 Assignment 3 Solution and Discussion:

Question # 2:
What are the Open GL Buffers and how can you create and allocate these buffers. Discuss with an example.

Nearly everything you may ever do with OpenGL will involve buffers full of data. Buffers in
OpenGL are depicted as buffer objects. As with several things in OpenGL, buffer objects are
named using GLuint values. Values are stored using the glGenBuffers () command.
Example: void glGenBuffers(GLsizei n, GLuint *buffers);
After calling glGenBuffers(),you will have an array of buffer object names in buffers, but at this
time, they’re simply placeholders. They’re not really buffer objects yet. The buffer objects
themselves don’t seem to be really created till the name is first sure to one of the buffer binding
points on the context. this can be important as a result of OpenGL could build choices regarding
the most effective way to assign memory for the buffer object based on where it’s bound.
]]></description><link>https://community.secnto.com//topic/2178/cs602-assignment-3-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/2178/cs602-assignment-3-solution-and-discussion</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS602 Assignment 2 Solution and Discussion Spring 2020]]></title><description><![CDATA[Graphics library for 64 bit Dev CPP.rar
]]></description><link>https://community.secnto.com//topic/1908/cs602-assignment-2-solution-and-discussion-spring-2020</link><guid isPermaLink="true">https://community.secnto.com//topic/1908/cs602-assignment-2-solution-and-discussion-spring-2020</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS602 Assignment 1 Solution and Discussion]]></title><description><![CDATA[Solution.cpp
#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; 
  int left = 200, top = 20; 
  int right = 430, bottom = 460; 
    
 
    // initgraph initializes the graphics system 
    // by loading a graphics driver from disk 
  initgraph(&amp;gd, &amp;gm, ""); 
  setcolor(WHITE);
  settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);
  outtextxy(10, 20, (char*)"BC123456789"); 
  
  setcolor(WHITE);
  setfillstyle(SOLID_FILL,WHITE);
  rectangle(left, top, right, bottom);
  bar(200,20,430,460);
  
  setcolor(LIGHTRED);
  setfillstyle(SOLID_FILL,LIGHTRED);
  circle(left+100,top+280,50);
  floodfill(left+100,top+280,LIGHTRED);
  
  
  setcolor(LIGHTGREEN);
  setfillstyle(SOLID_FILL,LIGHTGREEN);
  circle(left+160,top+340,30);
  floodfill(left+160,top+340,LIGHTGREEN);
     
  setcolor(LIGHTBLUE);
  line(left,top+280,right,bottom-20);
  setcolor(LIGHTGREEN);
  line(left,top+300,right,bottom);
  setcolor(LIGHTRED);
  line(left,top+320,right-30,bottom);
  
     
  getch(); 
  
    // closegraph function closes the graphics 
    // mode and deallocates all memory allocated 
    // by graphics system . 
  closegraph(); 
} 


Download Complete Solution
]]></description><link>https://community.secnto.com//topic/1850/cs602-assignment-1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1850/cs602-assignment-1-solution-and-discussion</guid><dc:creator><![CDATA[Wajahat Ali]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS602 GDB1 Solution and discussion]]></title><description><![CDATA[<p dir="auto">Re: <a href="/topic/270/cs602-gdb1-solution-and-discussion">CS602 GDB1 Solution and discussion</a></p>
<p dir="auto">Please share idea solution?</p>
]]></description><link>https://community.secnto.com//topic/1438/cs602-gdb1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1438/cs602-gdb1-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS602 Assignment 3 Solution and Discussion]]></title><description><![CDATA[Q. 1 Solution Idea
a. Final intensity of light is (0.4,0.7,0) +(0.2,0.1,0.5) +(-0.5, -0.6,0.5) +(-0.1, -
0.2,0) = (0,0,1)
b. Overall Contribution: id ⨂ cs = (0,0,1) ⨂ (0.5,0.7,0.8)
= (0,0,0.8)
c. Red and Green components will remain absent from the scene
d. The object will look blue in the presence of light sources.
Q. 2 Solution Idea:
[image: swrVJac.png]
]]></description><link>https://community.secnto.com//topic/1142/cs602-assignment-3-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/1142/cs602-assignment-3-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS602 Assignment 2 Solution and Discussion]]></title><description><![CDATA[//&lt;!--CS602 ASSIGNMENT 2 SOLUTION--&gt;
//&lt;!--FALL 2019--&gt;
//&lt;!--DUE DATE: 27 NOVEMBER, 2019--&gt;
//PRE-PARED BY: SUPERSTARWEBTECH.COM
//CONNECT WITH US:FACEBOOK.COM/SUPERSTARWEBTECH
//E-MAIL: SUPERSTARWEBTECH@GMAIL.COM

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;conio.h&gt;
#include &lt;graphics.h&gt;
#include &lt;math.h&gt;

class House
{
	private:
		int x1,x2,x3,x4,x5;
		int y1,y2,y3;
		int dx1, dx2;
		int dy1, dy2;
		
		int xc,yc;
		
	public:
		House()
		{
		xc=45;
		yc=65; //center of figure
		
		x1=30;
		x2=x1+50;
		x3=20;
		x4=x3+20;
		x5=x4+50;

		y1=30;
		y2=y1+20;
		y3=y2+50;

		dx1=x3+5;
		dx2=dx1+10;
		dy1=y2+30;
		dy2=dy1+20;
		}
		
		void translate(int tx, int ty) //draw translate house
		{
			x1+=tx;
			x2+=tx;
			x3+=tx;
			x4+=tx;
			x5+=tx;
		
			y1+=ty;
			y2+=ty;
			y3+=ty;
			
			dx1+=tx;
			dx2+=tx;
			
			dy1+=ty;
			dy2+=ty;
		}
		
		void scale(int sx, int sy) //draw scaled house
		{
			x1=xc+(x1-xc)*sx;
			x2=xc+(x2-xc)*sx;
			x3=xc+(x3-xc)*sx;
			x4=xc+(x4-xc)*sx;
			x5=xc+(x5-xc)*sx;
			
			y1=yc+(y1-yc)*sy;
			y2=yc+(y2-yc)*sy;
			y3=yc+(y3-yc)*sy;
			
			dx1=xc+(dx1-xc)*sx;
			dx2=xc+(dx2-xc)*sx;
			
			dy1=yc+(dy1-yc)*sy;
			dy2=yc+(dy2-yc)*sy;
			
		}

		void reflectx(int rx)
		{
			y1=-y1+rx;
			y2=-y2+rx;
			y3=-y3+rx;
		
			dy1=-dy1+rx;
			dy2=-dy2+rx;
		}
		
		void reflecty(int ry)
		{
			x1=-x1+ry;
			x2=-x2+ry;
			x3=-x3+ry;
			x4=-x4+ry;
			x5=-x5+ry;
			
			dx1=-dx1+ry;
			dx2=-dx2+ry;
		}
		
		void drawH() //draw house
		{
			int arr[]={x1,y1,x2,y1,x5,y2,x5,y3,x3,y3,x3,y2,x1,y1,x4,y2,x4,y3,x3,y3,x3,y2,x5,y2};
			drawpoly(12,arr); //draw house

			rectangle(dx1,dy1,dx2,dy2); //draw house door

		}
		void fillH()
		{
			setfillstyle(HATCH_FILL,GREEN);
			floodfill(x1+1,y1+10,WHITE);
			floodfill(x1+1,y1+1,WHITE);

			setfillstyle(SOLID_FILL,RED);
			floodfill(x3+1,y2+1,WHITE);

			setfillstyle(SOLID_FILL,YELLOW);
			floodfill(x4+1,y2+1,WHITE);

			setfillstyle(SOLID_FILL,GREEN);
			floodfill(dx1+1,dy1+1,WHITE);
		}
		
		void fillH2(){
			setfillstyle(HATCH_FILL,GREEN);
			floodfill(x1+1,y1-10,WHITE);
			floodfill(x1+1,y1-1,WHITE);

			setfillstyle(SOLID_FILL,RED);
			floodfill(x3+1,y2-1,WHITE);

			setfillstyle(SOLID_FILL,YELLOW);
			floodfill(x4+1,y2-1,WHITE);

			setfillstyle(SOLID_FILL,GREEN);
			floodfill(dx1+1,dy1-1,WHITE);
		}
};

int main()
{
int gd=DETECT, gm;
initgraph(&amp;gd,&amp;gm,(char*)" ");
setcolor(WHITE);
settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);
outtextxy(2, 2, (char*)"BC123456789");

House house;

//draw main house
house.drawH();
house.fillH();
outtextxy(2, 110, (char*)"1) Original");
//draw translated house
house.translate(200,0);
house.drawH();
house.fillH();
outtextxy(200, 110, (char*)"2) Translated");

//draw scaled house
house.translate(-190,70);
house.scale(2,2);
house.drawH();
house.fillH();
outtextxy(2, 280, (char*)"3) Scaled");

int x=90;
int y=350;

House h2;
// draw reflected house
h2.translate(200,70);
h2.reflecty(x);
h2.reflectx(y);
h2.reflecty(x);
h2.drawH();
h2.fillH2();
outtextxy(200, 270, (char*)"4) Reflected");

getch();
closegraph();

}
//&lt;!--NOTE--&gt;
//&lt;!--MAKE CHANGES ACCORDING TO YOUR REQUIREMENTS--&gt;
//&lt;!--DO NOT POST ON OTHER PORTALS THIS WILL LEAD TO COPYING OF CODE AND THEN YOU WILL GET ZERO MARKS FOR IT--&gt;
//&lt;!--PLUS TYPE YOUR OWN SOLUTION FOR NOT LOSING MARKS--&gt;
//&lt;!--DO NOT COPY PASTE--&gt;
//&lt;!--WE ARE NOT RESPONSIBLE FOR GETTING ZERO MARKS IN ASSIGNMENT--&gt;
//PRE-PARED BY: SUPERSTARWEBTECH.COM
//CONNECT WITH US:FACEBOOK.COM/SUPERSTARWEBTECH
//E-MAIL: SUPERSTARWEBTECH@GMAIL.COM

CS602_2_FALL_2019.txt
Displaying CS602_2_FALL_2019.txt.

]]></description><link>https://community.secnto.com//topic/684/cs602-assignment-2-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/684/cs602-assignment-2-solution-and-discussion</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[CS602 GDB1 Solution and discussion]]></title><description><![CDATA[FXAA is  the most interesting group of anti-aliasing techniques, these algorithms perform their duties during scene post-processing, after the rendering process. They are all shader-based and cause little to no performance drop, which is their most important advantage. Image quality can vary from one algorithm to another. For example, FXAA is known to make the image look a bit blurry, obviously to the chagrine of some players. Another commonly used technique is SMAA, which usually provides better quality than FXAA while getting around, or at least reducing, the blur effect. Game developers tend to implement their own post-process anti-aliasing algorithms as well. Some of the notable examples are CMAA in Grid: Autosport, AAA (heavily modified FXAA to eliminate blurring) in Metro: Last Light, and T-AA in Rainbow Six: Siege. There are also “injectors” that enable these techniques in games that don’t support post-process anti-aliasing natively.
]]></description><link>https://community.secnto.com//topic/270/cs602-gdb1-solution-and-discussion</link><guid isPermaLink="true">https://community.secnto.com//topic/270/cs602-gdb1-solution-and-discussion</guid><dc:creator><![CDATA[moaaz]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>