[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gaussian blur around target states
Tim, I'm afraid you're going to have to resort to script code on this
one.. Here's code that will create a 2d gaussian:
int x,y;
for(x=0;x<size;x++) {
for(y=0;y<size;y++) {
float distx = x - xctr; // xctr = where your maximal act is
float disty = y - yctr;
float dist = distx * distx + disty * disty;
float gaus = exp(-dist / var); // var = width of gaussian
yourevent.patterns[patno].value[y * size + x] = gaus; // set value
}
}
- Randy