Kleinian AgainBuffaloBulb FlowersMagnetosphere
BuffaloBulb Flowers
Previous Image | Next Image
Description: BuffaloBulb has many distinct areas, including bouquets of flowers.

based on: https://fractalforums.org/fragmentarium/17/buffalo-bulb-deltade/2313

//////////////////////////////////

camera = SIMD3<Float>(-0.27293348, -0.64645326, -1.678416)
viewVector =  SIMD3<Float>(-0.03414456, 0.33929354, 0.9400606)
topVector =  SIMD3<Float>(-0.09412682, 0.9353351, -0.3410107)
sideVector =  SIMD3<Float>(-0.9949744, -0.100128576, 1.490116e-08)
multiplier =  80.0
foam =  0.0
foam2 =  0.0
bend =  0.0
InvCenter =  0.1 , 0.1 , 0.1
InvRadius =  0.3
 
control.cx = 0.0
control.cy = 2.250014
control.cz = -0.5800003
control.cw = -0.12
control.dx = 0.6599997
control.dy = 1.1499994
control.dz = 0.88503367
control.dw = 2.039993
control.ex = 0.99998015
control.ey = 1.8999794
control.ez = 3.3499994
control.ew = -7.020001
control.fx = -8.809983
control.fy = -0.0074549243
control.fz = 0.08878942
control.fw = 2.9660387
control.fMaxSteps = 6.0
control.angle1 = -0.7000016
control.angle2 = 0.0
control.juliaX =  0.6382017
control.juliaY =  -0.4336
control.juliaZ =  -0.9396994
control.power = 8.0
control.bright = 1.0100001
control.contrast = 0.64000005
control.specular = 2.0

void BuffaloIteration(thread float3 &z, float r, thread float &r_dz,device Control &control) {
#define power44 control.cy
    r_dz = r_dz * 2 * r;
   
    if (control.preabsx) z.x = abs(z.x);
    if (control.preabsy) z.y = abs(z.y);
    if (control.preabsz) z.z = abs(z.z);
   
    float x2 = z.x * z.x;
    float y2 = z.y * z.y;
    float z2 = z.z * z.z;
    float temp = 1.0 - (z2 / (x2 + y2));
    float newx = (x2 - y2) * temp;
    float newy = power44 * z.x * z.y * temp;
    float newz = -power44 * z.z * sqrt(x2 + y2);
   
    z.x = control.absx ? abs(newx) : newx;
    z.y = control.absy ? abs(newy) : newy;
    z.z = control.absz ? abs(newz) : newz;
}

#define Bailout 4.0

// Compute the distance from `pos` to the bulb.
float3 DE1(float3 pos,device Control &control,thread float4 &orbitTrap) {
    float3 z=pos;
    float r = length(z);
    float dr=1.0;
    int i=0;
   
    float3 ot,trap = control.otFixed;
    if(int(control.orbitStyle + 0.5) == 2) trap -= pos;
   
    while(r<Bailout && (i<control.maxSteps)) {
        BuffaloIteration(z,r,dr,control);
        z+=(control.juliaboxMode ? control.julia : pos);
        r=length(z);
       
        z = rotatePosition(z,1,control.angle1);
        z = rotatePosition(z,2,control.angle1);
       
        ot = z;
        if(control.orbitStyle > 0) ot -= trap;
        orbitTrap = min(orbitTrap, float4(abs(ot), dot(ot,ot)));
       
        i++;
    }
   
    return z;
}

float DE_BUFFALO(float3 pos,device Control &control,thread float4 &orbitTrap) {
#define DEScale control.cx
    float3 z = pos;
    if(control.UseDeltaDE) {
        // Author: Krzysztof Marczak (buddhi1980@gmail.com) from  MandelbulberV2
        float deltavalue = max(length(z) * 0.000001, DEScale);
        float3 deltaX = float3 (deltavalue, 0.0, 0.0);
        float3 deltaY = float3 (0.0, deltavalue, 0.0);
        float3 deltaZ = float3 (0.0, 0.0, deltavalue);
       
        float3 zCenter = DE1(z,control,orbitTrap);
        float r = length(zCenter);
       
        float3 d;
        float3 zx1 = DE1(z + deltaX,control,orbitTrap);
        float3 zx2 = DE1(z - deltaX,control,orbitTrap);
        d.x = min(abs(length(zx1) - r), abs(length(zx2) - r)) / deltavalue;
       
        float3 zy1 = DE1(z + deltaY,control,orbitTrap);
        float3 zy2 = DE1(z - deltaY,control,orbitTrap);
        d.y = min(abs(length(zy1) - r), abs(length(zy2) - r)) / deltavalue;
       
        float3 zz1 = DE1(z + deltaZ,control,orbitTrap);
        float3 zz2 = DE1(z - deltaZ,control,orbitTrap);
        d.z = min(abs(length(zz1) - r), abs(length(zz2) - r)) / deltavalue;
       
        float dr = length(d);
       
        return 0.5 * r * log(r)/dr;  //logarythmic DeltaDE
        //return 0.5 * r/dr; //linear DeltaDE
    }
   
    float r = length(z);
    float dr=1.0;
    int i=0;
   
    float3 ot,trap = control.otFixed;
    if(int(control.orbitStyle + 0.5) == 2) trap -= pos;
   
    while(r<Bailout && (i<control.maxSteps)) {
        BuffaloIteration(z,r,dr,control);
        z+=(control.juliaboxMode ? control.julia : pos);
        r=length(z);
       
        z = rotatePosition(z,1,control.angle1);
        z = rotatePosition(z,2,control.angle1);
       
        ot = z;
        if(control.orbitStyle > 0) ot -= trap;
        orbitTrap = min(orbitTrap, float4(abs(ot), dot(ot,ot)));
       
        i++;
    }
   
    return 0.5*log(r)*r/dr;
}

float3 rotatePosition(float3 pos, int axis, float angle) {
    float ss = sin(angle);
    float cc = cos(angle);
    float qt;
   
    switch(axis) {
        case 0 :    // XY
            qt = pos.x;
            pos.x = pos.x * cc - pos.y * ss;
            pos.y =    qt * ss + pos.y * cc;
            break;
        case 1 :    // XZ
            qt = pos.x;
            pos.x = pos.x * cc - pos.z * ss;
            pos.z =    qt * ss + pos.z * cc;
            break;
        case 2 :    // YZ
            qt = pos.y;
            pos.y = pos.y * cc - pos.z * ss;
            pos.z =    qt * ss + pos.z * cc;
            break;
    }
    return pos;
}


Stats:
Views: 31
Total Favorities: 0 View Who Favorited
Filesize: 4.26MB
Height: 1063 Width: 2200
Keywords: BuffaloBulb 
Posted by: kosalos March 15, 2020, 07:08:30 PM

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

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

Comments (1) rss

gerson
Fractal Furball
***
Offline Offline

Posts: 292



View Profile
March 16, 2020, 03:39:22 PM
Seems cactu's flowers, very good.

Return to Gallery


Powered by SMF Gallery Pro