0% found this document useful (0 votes)
79 views7 pages

Project On Computr Graphics: Submitted By

The document is about a project on computer graphics submitted by two students, Ajay Kumar and Kuldeep Jain. It includes an acknowledgement section thanking those who helped with the project. The introduction explains that the aim of the project was to create a screensaver of floating bubbles without overlap using graphics functions. The code section includes the C code used to generate random bubble positions and move the bubbles across the screen using functions like ellipse, fillEllipse, and delay.

Uploaded by

Ajay Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views7 pages

Project On Computr Graphics: Submitted By

The document is about a project on computer graphics submitted by two students, Ajay Kumar and Kuldeep Jain. It includes an acknowledgement section thanking those who helped with the project. The introduction explains that the aim of the project was to create a screensaver of floating bubbles without overlap using graphics functions. The code section includes the C code used to generate random bubble positions and move the bubbles across the screen using functions like ellipse, fillEllipse, and delay.

Uploaded by

Ajay Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

PROJECT On COMPUTR GRAPHICS Submitted by:NAME:-AJAY KUMAR & KULDEEP JAIN ROLL NO:-A13 & A11 SEC NO:-K2005

SUB:-CSE309 Submitted to:Mr. ROHITT SHARMA

AGENDA 1.) ACKNOWLEDGEMENT 2.) INTRODUCTION 3.) CODE 4.) OUTPUT

ACKNOWLEDGEMENT

I would like to express my gratitude to all those who have helped me in the successful completion of my project. I want to thank the Department of CSE of Lovely Professional University for giving me permission to commence on this project. I would like to thank MR. ROHITT SHARMA for helping me somehow and encouraged me to go ahead with my project. Especially, I would like to give my special thanks to my Class Teacher whose enabled me to complete this work.

INTODUCTION
Aim:- Program to make floating bubbles in the water.

In this program what we did that we have used several types of manual and built-in functions to Achieve appropriate,precise Output.the main function is Graphic functions to get the the crucial,surge effects. our intention is to make a screensaver of floating bubbles without overlap feature. we used various types of header file to get the rad functionality and to get the prominent result. There are some buillt-in functions that we did use and the functions and the libraries are listed below:-

1) Ellipse function. 2) Delay function 3) fill Ellipse function 4) clear Device function 5) Graphics Functions 6) kbhit(); 7)initgraph // to clear the current screen // to get the spectacular graphic effects // for keystrokes based on pressed keys //to set foreground and background color // For Timing Purporse

CODE
#include<conio.h> #include<stdio.h> #include<dos.h> #include<graphics.h> #include<stdlib.h> void Bubble_fir(int,int); void Bubble_y(int,int); void Play_sound() { sound(700); delay(100); nosound(); } void Bubble_y(int randval_x,int randval_y) { fillellipse(randval_x,randval_y,20,20); } main() { int i,j=1,val_x=1,val_y=1,count_x= 1,randval_x, randval_y,dx,dy; int gd=DETECT, gm; clrscr(); randomize(); initgraph(&gd, &gm , "c://turboc3\\bgi"); dx = 610; dy = 455; setbkcolor(4); //Set Background Color while(!kbhit()) { printf("."); if(count_x <= dx) { putpixel(count_x,100,WHITE); setfillstyle(8, CYAN); /* set the fill style */ Bubble_fir(count_x,200); Bubble_y(100,count_x); Bubble_y(500,count_x); Bubble_y(count_x,350); delay(8); count_x++; cleardevice(); } if(count_x == dx)

{ do {

Play_sound();

setfillstyle(8, YELLOW); /* set the fill style */ Bubble_fir(--count_x,200); Bubble_y(--count_x,350); Bubble_y(100,--count_x); Bubble_y(500,--count_x); delay(8); cleardevice(); } while(count_x >0); } } getch(); closegraph(); return 0; } void Bubble_fir(int randval_x,int randval_y) { fillellipse(randval_x,randval_y,20,20); }

You might also like