Electrofriends

C Program to draw a rectangle and perform the operations.

by Ranjith | October 2nd, 2009.

C Program to draw a rectangle and perform the following operations.
a. Rotation about the origin followed by translation.
b. Rotation about an arbitrary point.
c. Apply X shear and Y shear on the rectangle.

Read More..

C Program to implement the midpoint circle drawing algorithm

by Ranjith | October 2nd, 2009.

C Program to implement the midpoint circle drawing algorithm to draw a circle. Modify the algorithm toimplement specified arc or sector.

Read More..

C Program to display a line graph using midpoint line algorithm.

by Ranjith | October 2nd, 2009.

Program to display a line graph using midpoint line algorithm. The input to the program is a set of data corresponding to the X and Y-axes. Data parts are to be displayed as asterisk (*) according to the input specification.

Read More..

C Program to for Midpoint Line algorithm

by Ranjith | October 2nd, 2009.

Program to implement the Midpoint Line algorithm to generate a line of given slope and thickness. Implement the polyline (many lines) command using this algorithm as a routine that display a set of straight lines between N input points. For n=1 the routine displays a single point.

Read More..

C program to for Moving Car

by Ranjith | October 2nd, 2009.

line(80+i,300,90+i,270);
line(90+i,270,120+i,270);
line(120+i,270,160+i,240);
line(160+i,240,230+i,240);
line(230+i,240,275+i,270);

Read More..

C program to for Rotation of wheel

by Ranjith | October 2nd, 2009.

theta=M_PI*angle/180;
x[i]=xc+r*cos(theta);
y[i]=yc+r*sin(theta);
angle+=20;
line(xc,yc,x[i],y[i]);

Read More..

C Program to impliment Fish Movement

by Ranjith | October 2nd, 2009.

x+=5;
y+=1;
arc(x,y,stangle,endangle+35,radius);
arc(x,y-110,190,323,radius+2);
circle(x+40,y-60,5);
line(x-90,y-90,x-90,y-8);

Read More..

C program to implement Spiral Model

by Ranjith | October 2nd, 2009.

setcolor(YELLOW);
printf(“ENTER THE NUMBER OF RINGS IN THE SPIRAL MODEL\n”);
scanf(“%d”,&n);
printf(“Enter the origin point of the spiral”);
scanf(“%d%d”,&x,&y);

Read More..

C program to implement Bar Graph

by Ranjith | October 2nd, 2009.

setcolor(CYAN);
printf(“ENTER THE NUMBER OF DATA ELEMENTS\n”);
scanf(“%d”,&n);

line(1,1,1,479);// Y axis
line(1,479,640,479);// X axis

Read More..

C Program to implement Kite flying

by Ranjith | October 2nd, 2009.

void main()
{
int gd=DETECT,gm;
int x=10,y=480;
initgraph(&gd,&gm,”..\\bgi”);
while(!kbhit())
{
cleardevice();
if(y==0)

Read More..

Share and enjoy

    • Digg
    • Facebook
    • Technorati
    • StumbleUpon
    • Twitter
    • Reddit
    • del.icio.us
    • Yahoo! Buzz
Copyright©2009 www.electrofriends.com All Rights Reserved. Powered by Dhyeya