At 7/8/08 01:53 PM, MindChamber wrote:
these are all very awesome, any links of them in motion?
No, but if you download the pixel bender toolkit I can give you the code so you can zoom around on your own.
<code>
<languageVersion: 1.0;>
kernel mandelbrot
<
namespace : "Fractals";
vendor : "Glaiel";
version : 1;
>
{
parameter int iterations
<
minValue:int(1);
maxValue:int(3000);
defaultValue:int(5);
>;
parameter float zoom
<
minValue:float(1.0);
maxValue:float(10.0);
defaultValue:float(2.5);
>;
parameter float2 orgin
<
minValue:float2(-2.0, -1.0);
maxValue:float2(1.0, 1.0);
defaultValue:float2(0.0, 0.0);
>;
parameter float2 k
<
minValue:float2(-2.0, -1.0);
maxValue:float2(1.0, 1.0);
defaultValue:float2(0.0, 0.0);
>;
region generated()
{
return everywhere();
}
output float4 dst;
void
evaluatePixel()
{
float2 coord = outCoord()/pow(10.0, zoom)+float2(orgin);
float2 coord2 = coord;
int iteration = 0;
while (coord.x*coord.x + coord.y*coord.y <= (4.0) && iteration < iterations ) {
float xtemp = coord.x*coord.x - coord.y*coord.y + coord2.x + k.x;
coord.y = 2.0*coord.x*coord.y + coord2.y + k.y;
coord.x = xtemp;
iteration = iteration + 1;
}
float4 color = float4(0.0, 0.0, 0.0, 1.0);
if (iteration != iterations) {
while(iteration>0){
if(color.b<1.0){
color.b += .1/zoom;
} else if(color.g<1.0){
color.g += .1/zoom;
} else if (color.r<1.0){
color.r += .1/zoom;
} else {
color.b = 0.0;
color.g = 0.0;
color.r = 0.0;
}
iteration -= 1;
}
}
dst = color;
}
}</code>