Circle Generation by Mid Point Methods
Circle Generation by Mid Point Methods
Circle Generation by Mid Point Methods
TECHNOIOGY
LABORATORY
MANUAL
ISSUE NO.:
ISSUE DATE:
REV No.:
REV. DATE:
Page :
LABORATORY:
CAD LAB
SEMESTER : VIth
DEPTT. Mechanical
Engg.
# include<graphics.h>
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
# include<math.h>
#include<dos.h>
#include<c:\graph/co_axis.h
Void main()
{
1/5
DEHRADUN INSTITUTE OF
TECHNOIOGY, Dehradun
LABORATORY
MANUAL
ISSUE NO.:
ISSUE DATE:
REV No.:
REV. DATE:
Page :
LABORATORY:
CAD LAB
SEMESTER : VIth
DEPTT. Mechanical
Engg.
2/5
DEHRADUN INSTITUTE OF
TECHNOIOGY, Dehradun
LABORATORY
MANUAL
ISSUE NO.:
ISSUE DATE:
REV No.:
REV. DATE:
Page :
3/5
DEPTT. Mechanical
Engg.
LABORATORY:
CAD LAB
SEMESTER : VIth
{
X=x+1,y=y-1;
P=p+2*x+1-2*y;
Putpixel(Cx+x,Cy+y,12);
Putpixel(Cx+y,Cy+x,12);
Putpixel(Cx-x,Cy+y,12);
Putpixel(Cx+x,Cy-y,12);
Putpixel(Cx-x,Cy+y,12);
Putpixel(Cx+y,Cy-X,12);
Putpixel(Cx-x,Cy-y,12);
Putpixel(Cx-y,Cy-x,12);
Getch();
Closegraph();
}
Prepared by: Mr shwetabh singh
DEHRADUN INSTITUTE OF
TECHNOIOGY, Dehradun
LABORATORY
MANUAL
ISSUE NO.:
ISSUE DATE:
REV No.:
REV. DATE:
Page :
LABORATORY:
CAD LAB
SEMESTER : VIth
DEPTT. Mechanical
Engg.
4/5
DEHRADUN INSTITUTE OF
TECHNOIOGY, Dehradun
LABORATORY
MANUAL
ISSUE NO.:
ISSUE DATE:
REV No.:
REV. DATE:
Page :
LABORATORY:
CAD LAB
SEMESTER : VIth
DEPTT. Mechanical
Engg.
Initgraph(&gdriver,&gmode,d:\\tc\\bgi);
Printf(\n Enter the first coordinate);
Scanf(%d%d&Xa&Ya);
Printf(\n Enter the second coordinate);
Scanf(%d%d&Xb&Yb);
Coordinate _axis();
Bresline(Xa,Ya,Xb,Yb);
Getch();
Closegraph();
}
6
5/5