Need method to create 640*480 random data @ 60 Hz and update to scr.
Need method to create 640*480 random data @ 60 Hz and update to scr.
(OP)
Need method to create 640*480 random data @ 60 Hz and update to scr.
I have been working with this problem for the last few days. I'm simply trying to create an array fo 640X480 randomly shaded pixels and update them to a display (or mask with another array) at the rate of 60 Hz. The video is to be continuous and unique. Any ideas on completing this would be helpful!
Best Regards!
I have been working with this problem for the last few days. I'm simply trying to create an array fo 640X480 randomly shaded pixels and update them to a display (or mask with another array) at the rate of 60 Hz. The video is to be continuous and unique. Any ideas on completing this would be helpful!
Best Regards!





RE: Need method to create 640*480 random data @ 60 Hz and update to scr.
Do you think this is quick enough. I think it takes a while to repeat itself. The value for the seed is not really important.
/* Generate pseudo randon numbers for video: */
#define MAX_PIX 256
static double seed = 0.6287393495854736252536643784327L;
/*... */
int pixle;
seed = seed * 147.0;
seed = seed - (int)seed;
pixle = (int)(seed * MAX_PIX);