The study of randomology. In theory at some point or another all possibilities of a given function will occur. So what does random look like?
With this wicked prog to aid in the study of randomology you should see what random looks like. What this wicked prog does is generate a random x value in the window
dimentions. It then generates a random y value or point in the window. Then it produces a random value for the RED color. A GREEN random value is then selected. And last a BLUE random value.
It then sets one pixel at the x and y cordinates with the random RED random GREEN random BLUE value.
What you get is an image that can not be mesured in frames per second. The image eventhough random appears to be of patterns that are semetrical. If you stare
at the center of the image while it runs you get to see a crystal shape that changes in a sphere with prongs. Then you get to see the rise and fall of a 3d image.
Like a fog or mist with patterns of flowers moving and dancing. Wicked! yes! you may want to put a getch() but i just wanted to see how fast it would run. These are the fun progs i love to do. enjoy.
disclaimer. i will not be responsible if you puke vomit or get sick from this prog. If it should cause you to faint go insane or anyother problem or crash your computer
i will not be responsible because by run this prog at you own risk.
suggestions for improvements comments other? fun yes?
/* Wicked.c */
/* by KryptKat! */
/* June 11, 2006 */
#define MAX 261
LRESULT CALLBACK MainWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
meowWin.style = CS_VREDRAW | CS_HREDRAW;
meowWin.lpfnWndProc = MainWindowProc;
meowWin.cbClsExtra = 0;
meowWin.cbWndExtra = 0;
meowWin.hInstance = hInstance;
meowWin.hIcon = LoadIcon (NULL, IDI_APPLICATION);
meowWin.hCursor = LoadCursor (NULL, IDC_ARROW);
meowWin.hbrBackground = (HBRUSH) (COLOR_SCROLLBAR + 1);
meowWin.lpszMenuName = 0;
meowWin.lpszClassName = "wicked";
if (!RegisterClass (&meowWin))
hwnd = CreateWindow ( "Wicked",
WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME,
MAX + 40,
MAX + 60,
ShowWindow (hwnd, nCmdShow);
while (GetMessage (&msg, NULL, 0, 0))
LRESULT CALLBACK MainWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
HDC hdc = BeginPaint(hwnd, &ps);
j = rand() % MAX;
i = rand() % MAX;
b = rand() % 255;
d = rand() % 255;
e = rand() % 255;
SetPixel (hdc, j + 20, i + 20, RGB (b, d, e));
return DefWindowProc (hwnd, msg, wParam, lParam);