• May 12, 2021, 01:14:54 PM

Login with username, password and session length

 


DoorsCovid escapes a MaskMommy it hurts
Covid escapes a Mask
Previous Image | Next Image
Description: Rendition of MagnetoBulb : https://fractalforums.org/code-snippets-fragments/74/magnetobulb/3824
(plus spherical inversion)

CPU -----------------------------------------

control.isteps = 7
control.cx = 7.080004
control.cy = 3.880001
control.cz = 12.079996
control.cw = 1.8299994
control.dx = 1.3000002
control.dy = 0.5
control.InvCx = 2.5399997
control.InvCy = 1.42
control.InvCz = 0.5100002

control.doInversion. = true
control.InvCenter = float3(control.InvCx, control.InvCy, control.InvCz)
control.InvRadius =  0.37999994
control.InvAngle =  -7.4099956


// GPU --------------------------------------

float DE_Inner(float3 pos,device Control &control) {
    float p0 = control.cx;
    float4 z = float4(fmod(pos, control.cy),  control.dx);

    for(int i=0; i < control.isteps; ++i) {
        z.xyz = clamp(z.xyz, -p0, p0) * control.cw - z.xyz;
        z *= control.cz / max(dot(z.xyz, z.xyz), 0.0);
       
        p0 *= control.dy;
    }
   
    return (length(max(abs(z.xyz) - float3(0.0, 20.0, 0.0), 0.0))) / z.w;
}

float DE(float3 pos,device Control &control) {
    if(control.doInversion) {
        pos = pos - control.InvCenter;
        float r = length(pos);
        float r2 = r*r;
        pos = (control.InvRadius * control.InvRadius / r2 ) * pos + control.InvCenter;
       
        float an = atan2(pos.y,pos.x) + control.InvAngle;
        float ra = sqrt(pos.y * pos.y + pos.x * pos.x);
        pos.x = cos(an)*ra;
        pos.y = sin(an)*ra;
        float de = DE_Inner(pos,control);
        de = r2 * de / (control.InvRadius * control.InvRadius + r * de);
        return de;
    }
   
    return DE_Inner(pos,control);
}

Stats:
Views: 41
Total Favorities: 0 View Who Favorited
Filesize: 4.54MB
Height: 1148 Width: 2400
Keywords: stereo 
Posted by: kosalos March 16, 2021, 08:52:52 PM

Rating: **** by 1 members.
Total Likes: 1

Image Linking Codes
BB Code
BB Thumbnail Image Code
BB Medium Image Code
0 Members and 1 Guest are viewing this picture.

Comments (0)


Return to Gallery


Powered by SMF Gallery Pro