Quote:
|
Originally Posted by Goboom
Does anyone know what this equation is!?
I need it for a paint program I am writing which still needs a name by the way! 
|
I develop an open source graphics program, and the 2 main methods for aliasing we use are...
1) A blur grib of {0,1,0},{1,4,1},{0,1,0}. What this means is for each pixel, we take 4 times its current value, and 1 times the value of those directly adjacent. We then divide this value by 8 in order to scale it back down.
2) When applying a matrix or such to the image (for rotation, scaling/resizing and trippy effects), whe use the inverse matrix to see where the pixel 'came from' (applaying a matrix using the inverse is much better as you dont get 'gaps'). So like for each pixel on the out put, we see where its colour must have come from. Ususally this will not fall on an exact pixels, so we take a proportionate ammount from the 4 with which it is nearest. We calculate our proportions by the following method.... imageine the four nearest pixels as the corners of a square. now where you inverse matrix falls, draw a cross so that the square is split into 4 regions. We now use the area of the region which is diagonally opposite each corner to decide the weighting. I have attached a diagram to try and make this clearer, and attached an image of what this looks like in effect.
I dont know if these are official methods but they give the effect we needed sooo....