Posts

Showing posts from May, 2011

Program for Ellipse Generation Using Bresenham's Algorithm in C++

//Program to implement Ellipse Drawing Algorithm #include<iostream.h> #include<graphics.h> #include<conio.h> #include<math.h> #include<dos.h> #include<stdlib.h> #include<stdio.h> class myCircle     {     private:     int x,y,r,d,x1,y1,minor,major,dtheta,ratio,a,b,x2,y2;     public:     myCircle();      //Constructor     void showCircle();     }; myCircle::myCircle()         {         x=0;y=0;         cout<<"     "Enter The Major & Minor Axis Of Ellipse ":=";         cin>>major>>minor;         cout<<"     "Enter The Center Of The Ellipse ":=";         cin>>x>>y;         } void myCircle::showCircle()         {         char *s;                 int ax,ay;                 float ar;                 x1=1;                 ratio=major/minor;                 getaspectratio(&ax,&ay);         ar=1;         while(x1<=major)    

Introduction to Computer Graphics

Computer Graphics Computer Graphics:- Computer Graphics is a sub field of computer science and is concerned with visual content till recently the   output obtained from a computer has been alpha numeric. It is well known that information presented in Graphical and pictorial form tremendously helps human comprehension. For example , Bar charts, Pie charts, Sales Graphs, etc. Are commonly use by managers. Building plans, perspective views , card board models etc. Are used by architects , Engineers use mechanical drawings., Circuit diagrams, etc. In their work. Computer Graphics is concerned with the generation, representation, Manipulation and display of pictures with the help of Computer. With emergence of Graphical user Interface (GUI) Computer Graphics has become an integral part of all computers today. Branches of Computer Graphics:- Modeling: - Modeling describes the shake of an object. Be cause the appearance of an object depends largely on the exterior of the object, bound