Beruflich Dokumente
Kultur Dokumente
Department of Computer Science & Engineering KARNATAK LAW SOCIETYS VISHWANATHRAO DESHPANDE RURAL INSTITUTE OF TECHNOLOGY HALIYAL-581329, DIST. UTTAR KANNADA, KARNATAKA
Karnatak Law Societys VISHWANATHRAO DESHPANDE RURAL INSTITUTE OF TECHNOLOGY HALIYAL (UTTAR KANNADA) 581329
Department of Computer Science & Engineering CERTIFICATE Certified that the project on SIMPLE CIRCUIT WITH BULB is a bonafide work carried out by SAYYAN N. SHAIKH, in partial fulfillment for the award of Bachelor of Engineering in Computer Science & Engineering of Visvesvaraya Technological University, Belgaum during the year 2010.The Project report has been approved as it satisfies the academic requirements in respect of Project for the Bachelor of Engineering Degree.
___________________ __________________ ____________________ Signature of the Guide Signature of the HOD Signature of the Principal Prof. Saleem Hebbal Prof. A.V.Kolaki Dr. G.R.Udupi EXTERNAL VIVA
ACKNOWLEDGEMENT
The magnitude of this project demanded the co-operation, guidance and assistance from a number of people and I have been fortunate to have this, and I take this opportunity to thank all those who have helped me in this project. I express a deep sense of gratitude to Prof. Saleem Hebbal for his constant timely advice, valuable suggestions and help given from time to time. I take this opportunity to thank Prof. A.V.Kolaki HOD of Computer Science and Engineering Dept, VDRIT Haliyal providing the inspiration for taking the project to its completion. I will be failing in my duty if I dont thank our principal Dr. G.R.Udupi for providing healthy environment in the college that helped in concentrating on the task. Then I would also thank all teaching and non teaching staff of the department who directly or indirectly contributed in accomplishing this task. Last but not the least I express my sincere thanks to all persons who have directly or indiretly assisted my endeavor.
-Project Associate
Sayyan.N.Shaikh
ABSTRACT
This project will demonstrates the working of a simple circuit which consist a bulb and a simple switch with user interaction the circuit gets closed and current flows from positive to negative end of battery.I have developed the above concept using OpenGL utilities.This is a simple graphics package that uses OpenGL functions. Computer graphics is concerned with all aspects of producing pictures or images using a computer. In this project we are using the openGL functions. Also we use hardware interface like mouse. Here I have demonstratrd the model with the use of Polygons,Circle and Lines of various size.Using OpenGL functions I have demonstrated this model.
ii
CONTENTS
Chapter Description Acknowledgement Abstract List of Figures 1 INTRODUCTION
1.1 Introduction to Computer Graphics 1.2 Introduction to Project 1.3 Fundamental Functions of Graphics
Page No. i ii iv 01
01 01 02
2 3
04 07
07 07
08
08 08
5 6
SNAPSHOTS CONCLUSION
6.1 Future Enhancements
09 11
11
REFERENCES
12
iii
LIST OF FIGURES
Figure No. 5.1 5.2 Description Open Circuit Closed Circuit Page No. 09 10
iv
INTRODUCTION
Introduction to Computer Graphics:
Computer graphics is one of the most exciting and rapidly growing computer field and computer. It is also an extremely effective medium for communication between men. The human can understand the information content of a displayed diagram or perspective view much faster than it can understand a table of numbers. There is a lot of development in hardware and software required to generate images, and now-a-days the cost of such hardware and software is also dropping rapidly. Due to this the interactive computer graphics is becoming available to more and more people. Computer graphics today is largely interactive. The user controls the contents, structure, and appearance of the objects and of there displayed images by using input devices, such as keyboard, mouse, or touch-sensitive panel on the screen. Because of the close relationship between the input devices and the display, the handling of such devices is included in the study of computer graphics. Graphics based user interfaces allowed millions of new users to control simple, low-cost application programs, such as spread sheets, word processors, and drawing programs.
GLUT_RIGHT_BUTTON), the state of the button after the event (GLUT_UP, GLUT_DOWN), and the position of the mouse relative to the top-left corner of the window. void glutBitmapCharacter(void *font, int character) : This function renders a bitmap character using OpenGL. GLUT_BITMAP_HELVETICA_12: A 12-point proportional spaced Helvetica font. The exact bitmaps to be used is defined by the standard X glyph bitmaps for the X font named:-adobetimes-medium-r-normal--10-100-75-75-p-54-iso8859-1. void glClearColor(GLclampf r, GLclampf g, GLclampf b, GLclampf a) : This function sets the present RGBA clear color used when clearing the color buffer. Variables of type GLclampf are floating point numbers between 0.0 and 1.0. glColor3f(0.0f,1.0f,0.0f) : glColor3f( ) takes three float arguments indicating red, green and blue components of the color. Before continuing our main discussion let's talk a little about OpenGL command syntax. Various groups of OpenGL commands perform the same operation but they are different in arguments. Common OpenGL commands syntax is: gl+<functionname>+<aclass='x3dmainlinkargumentsnumber>+<aclass='x3d mainlinkargumenttype> + <vector> We can use glBegin( )/glEnd( ) block to indicate the primitive type. You can specify vertices inside this block by glVertex( ) command. glBegin( ) takes a parameter specifying the primitive type. Note that the order in which we call glVertex( ) command is very important. Here we specified the vertices in a counter clock wise order. The importance rises from the fact that OpenGL can cull the back faces and speed up the rendering procedure as a result.
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 3
ALGORITHM
// Purpose: Open GL program to demonstrate the basic concept of simple circuit.
// Output: The output will demonstrates the flow of current in simple circuit which
consist a bulb.
Step 10: [MyMouse Function] This function will provide a user interaction to the program.
10.1 When right mouse button is pressed the circuit gets closed by calling close function call and the current flows across the circuit. 10.2 When left mouse button is pressed the circuit gets open by calling open function call and current will not flow across the circuit.
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 6
OUTPUT:
The output will demonstrate the flow of current across the circuit which consist a bulb.
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 7
HARDWARE REQUIREMENTS:
Minimum hardware configuration required for our project. Processor: Pentium processor with minimum capacity of 32MB of RAM. Hard disk capacity: There is no much restriction on the capacity of a hard disk. But we prefer to have at least 20 GB of Hard disk. Monitor: The color monitor with 14 and above configuration can be used. Mouse.
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 8
SNAPSHOT
Figure 5.1 will shows the Open Circuit in which switch gets open on the interaction of user with left mouse button and current will stop flowing.
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 9
Figure 5.2 will shows the Closed circuit in which switch gets closed on the interaction of user with right mouse button and current will start flowing across the circuit.
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 10
Chapter 6
CONCLUSION
The output will demonstrates the flow of current in simple circuit consisting bulb and simple switch. Using OpenGL functions and commands i have demonstrated the the working of simple circuit.
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 11
REFERENCES
Text References:
[1] Computer Graphics Using OpenGL -2 Edition, Pearson education, 2001.
nd
- F. S. Hill, Jr.
[2] Interactive Computer Graphics A Top-Down Approach with OpenGL -2 nd Edition, Addison Wesley, 2008.
- Edward Angel
Department of Computer Science & Engineering KLSs Vishwanathrao Deshpande Rural Institute of Technology, Haliyal 12