I have made the formula for calculation of the image from a shone spot on a black background and have tried to use CodeLab. In the text of the program I have marked those lines, in which I do not know how to use CodeLab. Help, please.
void Render(Surface dst, Surface src, Rectangle rect)
{
int x1, x2, y1, y2;
double b2, r2, bri, brisum, a = 100.0;
for(x2 = rect.Left; x2 < rect.Right; x2++)
{
for(y2 = rect.Top; y2 < rect.Bottom; y2++)
{
for(x1 = rect.Left; x1 < rect.Right; x1++)
{
brisum = 0.0; // for brightness
for(y1 = rect.Top; y1 < rect.Bottom; y1++)
{
bri = src[x1,y1].GetBrightness(); // !!! i need get Brightness source point, CodeLab - Error
b2 = (x2 - x1)^2 + (y2 - y1)^2;
r2 = b2 + a * a;
brisum = brisum + bri*Math.Sqrt(b2/r2)/r2;
} //y1
} //x1
dst[x2,y2] = brisum; // i need set brightness target point
} // y2
} // x2
}