kernel AngelOfHydra < nameSpace : "Petri Leskinen"; version : 1; description : "... some experiment, Feb 2008"; > { parameter pixel4 clor < minValue:pixel4(0,0,0,0); maxValue:pixel4(1,1,1,1); defaultValue:pixel4(1,1,1,1); description: "Color"; >; parameter pixel4 bgColor < minValue:pixel4(0,0,0,0); maxValue:pixel4(1,1,1,1); defaultValue:pixel4(0,0,0,0); description: "Background color"; >; parameter float3 po1 < minValue:float3(-200.0, -200.0,0); maxValue:float3(2048.0, 2048.0,100); defaultValue:float3(150,150,75); description: "Point1"; >; parameter float3 po2 < minValue:float3(-200.0, -200.0,0); maxValue:float3(2048.0, 2048.0,100); defaultValue:float3(250,250,100); description: "Point2"; >; void evaluatePixel(in image4 src, out pixel4 dst) { float2 po = (outCoord()-po1.xy)/po1.z; float tmp= po.x*po.x + po.y*po.y; float2 val =tmp/po; po = (outCoord()-po2.xy)/po2.z; tmp= po.x*po.x + po.y*po.y; val += 1.0/po; val = 1.0/val; dst = (val.x*val.x+val.y*val.y>1.0) ? clor : bgColor; } }