Posts

Showing posts from 2014

Computer Graphics lesson's

Basic's of how to draw a line in TurboC.... #include<iostream.h> #include<conio.h> #include<stdio.h> #include<dos.h> #include<graphics.h> #include<math.h> void main() {  clrscr();  float x,y,x1,x2,y1,y2,dx,dy,lenght;  int i,gd,gm;  cout<<"enter x1 and y1"<<endl;  cin>>x1>>y2;  cout<<"enter x2 and y2"<<endl;  cin>>x2>>y2;  detectgraph(&gd,&gm);  initgraph(&gd,&gm,"C:\\TC\\BGI");  dx=abs(x2-x1);  dy=abs(y2-y1);  if(dx>=dy)  { lenght=dx;}  else  {lenght=dy;}  dx=(x2-x1)/lenght;  dy=(y2-y1)/lenght;  x=x1+0.5 ;  y=y1+0.5;  i=1;  while(i<=lenght)  {   putpixel(x,y,15);   x=x+dx;   y=y+dy;   i++;  }  delay(100);  getch();  closegraph(); } Second basic's of drawing a line...... #include<iostream.h> #include<conio.h> #include<stdio.h> #i

Life's line

Image
life isn't above always going your way, life is something to be experienced, by the way.......! There are only two ways to live your life, only two ways to enjoy it, One is the right way ,, And other is the wrong way. The right is to share,give and love,, the other is to snatch,exploit and accumulate.... LOVE and MONEY are the symbol of these....   "Eleven Hints for Life" 1. It hurts to love someone and not be loved in return. But what is more painful is to love someone and never find the courage to let that person know how you feel. 2. A sad thing in life is when you meet someone who means a lot to you, only to find out in the end that it was never meant to be and you just have to let go. 3. The best kind of friend is the kind you can sit on a porch swing with, never say a word, and then walk away feeling like it was the best conversation you've ever had. 4. It's true that we don't know what we'v