diff --git a/Source/Color.c b/Source/Color.c index 485205d..276a2f4 100644 --- a/Source/Color.c +++ b/Source/Color.c @@ -129,10 +129,15 @@ int Calc(UINT x, UINT y) cr = graph.x0 + (x - (double)display.width / 2) / display.mlen * graph.size; ci = graph.y0 + (y - (double)display.height / 2) / display.mlen * graph.size; for (i = 0; i <= (int)graph.limit; i++) { - if (zr * zr + zi * zi > 4) return i; + //if (zr * zr * zr * zr + zi * zi * zi * zi> 4) return i; + //tmp = zr * zr * zr * zr - zi * zi * zi *zi + cr; + if (zr * zr + zi * zi> 4) return i; tmp = zr * zr - zi * zi + cr; zi = 2 * zr * zi + ci; zr = tmp; + //tmp = (zr * zr - zi * zi) * zr - (2 * zr * zi + ci) * zi + cr; + //zi = 2 * (zr * zr - zi * zi) * (2 * zr * zi + ci) + ci; + //zr = tmp; } return -1; } \ No newline at end of file diff --git a/Source/Main.c b/Source/Main.c index e70a6ed..1b72469 100644 --- a/Source/Main.c +++ b/Source/Main.c @@ -180,7 +180,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) lpPixel = (LPDWORD)HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, //display.width * display.height * 4 - GetSystemMetrics(SM_CXSCREEN) * GetSystemMetrics(SM_CYSCREEN) * 4 + max( + GetSystemMetrics(SM_CXSCREEN) * GetSystemMetrics(SM_CYSCREEN), + 2000 * 2000 + ) * 4 * 4 ); // DIBの情報を設定する bmpInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);