11 September, 2010

How to solve problems in loading Compiz in Ubuntu

The remastered version of the Ubuntu linux with Compiz preinstalled on it might have some working problems on some machines... I have to face the same situation in some of my friends machines with AMD motherboard, when  I  tried to install a version of the Ubuntu which is remastered using an Intel PC. Here is a simple solution through which i have solved this problem to an extend.

1. Click on the Compiz Fusion Icon from Applications >
    System Tools

2. Right click on the Compiz Fusion Icon on the panel
    to open up the menu. Select Compiz from Select 
    Window Manager
  
2. Click on the Reload Window Manager to reload 
    the compiz window manager.


 3. Change the Visual Effects to Normal or Extra. Right 
     click on the desktop and select the Change 
     Desktop Background and then Visual Effects.
4.  This might be enough for loading compiz. You can
     add the command 'compiz-decorator' to the 
     startup applications to automatically launch 
      compiz on logon.
Read rest of entry

23 February, 2010

Computer Graphics : Bucket overflowing with water

Computer Graphics program to illustrate a bucket overflowing with water...

#include"conio.h"
#include"dos.h"
#include"graphics.h"

void main()
{
int gd=DETECT,gm=DETECT,i,j;
initgraph(&gd,&gm,”c:\tc\bgi”);
ellipse(300,200,0,360,50,25);
ellipse(300,300,0,360,50,25);
line(250,200,250,300);
line(350,200,350,300);
ellipse(300,100,180,360,5,2);
line(295,100,295,80);
line(305,100,305,86);
arc(300,80,90,180,5);
putpixel(306,85,15);
putpixel(307,84,15);
line(308,84,630,84);
line(300,75,303,75);
line(314,75,630,75);
putpixel(304,74,15);
putpixel(305,73,15);
line(306,72,306,65);
line(311,72,311,65);
putpixel(312,73,15);
putpixel(313,74,15);
pieslice(309,62,0,360,5);

line(0,300,600,300);
for(i=0;i<4;i++)
{ line(297+i,103,297+i,300);
}
for(i=1;i<100;i++)
{
//
setcolor(1);
ellipse(300,300-i,180,360,4,2);
delay(50);
setcolor(1);
fillellipse(300,300-i,49,25);
delay(50);
}
for(i=0;i<101;i++)
{
setcolor(9);
ellipse(300,198+i,0,360,53,25);
setcolor(15);
ellipse(300,200,0,360,50,25);
ellipse(300,300,0,360,50,25);
line(250,200,250,300);
line(350,200,350,300);
delay(50);

}
for(i=0;i<50;i++)
{
setcolor(9);
ellipse(300,301,180,360,50+i,25+i);
delay(50) ;
}
getch();
}

Read rest of entry

Bressenham’s Line Drawing Algorithm

computer graphics program using C to implement Bressenham's line drawing algorithm

#include"stdio.h"
#include"conio.h"
#include"graphics.h"
#include"math.h"

void swap(int &x,int &y)
{
int k=x;
x=y;
y=k;
}

void main()
{
int gd=DETECT,gm=DETECT,x1,x2,y1,y2,dx,dy,p,k;
float m=0;

clrscr();

printf(“Enter the sarting point x1 & y1n”);
scanf(“%d%d”,&x1,&y1);

printf(“Enter the end point x2 & y2n”);
scanf(“%d%d”,&x2,&y2);

dx=abs(x2-x1);
dy=abs(y2-y1);
m=(float)(y2-y1)/(x2-x1);

initgraph(&gd,&gm,”");
cleardevice();

if(fabs(m)>1)
{
swap(x1,y1);
swap(x2,y2);
swap(dx,dy);
}

if((x1>x2))
{
x1=x2;
y1=y2;
}
p=2*dy-dx;
for(k=0;k<0) p="p+2*dy;" p="p+(2*dy)-(2*dx);">

getch();
}

Read rest of entry
 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger