목록수업 과제 & 실습/병렬프로그래밍 (2)
ddongstudy

1. Newton Fractal 정의 2. CPU 구현 // CPU(점&픽셀) 최종 #include "..\usr\include\GL\freeglut.h" #include #include #include #include #include #include struct ucomplex { float real; float imag; }; const int width = 1024; float scope = 0.8; // 확대,축소 float pre_scope = 0.0; float* z = (float*)malloc(width * width * sizeof(float)); unsigned char Image[width * width * 3]; float dx = 0.0, dy = 0.0; // mouse move..

1. Julia Set 정의 2. CPU 구현 #include #include #include #include #include "..\usr\include\GL\freeglut.h" const int Dim = 1024; unsigned char Image[Dim * Dim * 3]; float Theta = 0.0; int MaxIter = 256; // 콜백 함수 void Render(); void Reshape(int w, int h); void Timer(int id); // 사용자 정의 함수 void CreateJuliaSet(); int Julia(float a, float b, float cx, float cy, float R); void GetColorRainbow(float t, int ..