Wednesday, October 31, 2007

2nd week of my lab

On this week I have learnt how to actually draw something onto the computer screen. Also some new abbreviation like CLUT(Colour Look Up Table). I also have discovered the reason for a callback function and its uses over other conventional method.

Here's a sample code of what I did:

void MeltDown()
{
static int lines[800];
for(int i=0;i<800;i++) 10="="0)">600)
lines[i]=0;
}
for(int j=0;j=100&&j<=200) { PlotPixel(i,599-j,0,255,255); } else if(j>200&&j<=300) { PlotPixel(i,599-j,0,255,0); } else if(j>300&&j<=400) { PlotPixel(i,599-j,255,255,0); } else if(j>400&&j<=500) { PlotPixel(i,599-j,255,0,0); } } } }

This is how it looks like

No comments: