170 likes | 241 Views
CG Final Project. 600410055 陳易志. GPU Programming. Fractal. Fractal. It has a fine structure at arbitrarily small scales. It is too irregular to be easily described in traditional Euclidean geometric language. It is self-similar. It has a simple and recursive definition. 2 example.
E N D
CG Final Project 600410055 陳易志
GPU Programming Fractal
Fractal • It has a fine structure at arbitrarily small scales. • It is too irregular to be easily described in traditional Euclidean geometric language. • It is self-similar. • It has a simple and recursive definition.
2 example Mandelbrot set Julia set
Mandelbrot set Definition • wherec is a complex parameter. • Mandelbrot set M,
Iterative algorithm Mandelbrot(x,y){ c = complex(x,y); z0=0; i=0; while(i<n){ zn+1 = zn2 + c; If(| zn+1 |>s)return false; i++;} return true; }
Julia set • Difficult to give a definition. • Similar to mandelbrot set. • An example • quadratic polynomials • , • where c is a complex parameter.
Iterative algorithm julia(x,y,c){ z0 = complex(x,y); while(ture){ zn+1 = zn2 + c; If(| zn+1 | is divergent)return false; i++; } return true; }
problem • High computation • Per pixel • Iterate to n or infinity • Correctness • Can not iterate to infinity. • Do an approximation.
Proposed method • Parallel computing in GPU • Per pixel • GLSL Fragment Processor • assume |z|>float.MAX_VALUE is divergent. • assume s=2.
Result Mandelbrot set • N=400 • S=2
Result (cont.) Julia set • N=200 • S=10^1.5
demo Click image Click image
demo Click image Click image
limitation • Julia set is more difficult. • zn+1 = zn2 + c, grow very fast. • Increase iteration=>float bits is not enough. • single-precision vs. double-precision • 8 vs. 11 bits exponent • GLSL version 400 supports double, • but not all hardware support version 400.
Future • Better graph card supports double. • Numerical algorithm
resources • Julia set • Mandelbrot set • GLSL tutorial • GUIconcept