• June 23, 2021, 10:12:18 PM

Login with username, password and session length

 


The Silver Space PortMany WorldsDust
Many Worlds
Previous Image | Next Image
Description: Rendition of SurfBox: http://www.fractalforums.com/amazing-box-amazing-surf-and-variations/httpwww-shaperich-comproshred-elite-review/
(plus spherical inversion)

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

control.isteps = 25
control.cx = 1.42    // box1
control.cy = 4.06    // box2
control.cz = 0.50    // sphere1
control.cw = 0.20    // sphere2
control.dx = control.cx * control.cy // fold mod
control.fx = 2.31   // scale factor

control.juliaboxMode = true
control.juliaX =  -0.03
control.juliaY =  -3.84
control.juliaZ =  -7.00
control.julia = float3(control.juliaX,control.juliaY,control.juliaZ)

GPU ---------------------------------------

float surfBoxFold(float v, float fold, float foldModX) {
    float sg = sign(v);
    float folder = sg * v - fold; // fold is Tglad's
    folder += abs(folder);
    folder = min(folder, foldModX); // and Y,Z,W
    v -= sg * folder;
   
    return v;
}

float DE(float3 pos, device Control &control) {
    float3 c = control.juliaboxMode ? control.julia : pos;
    float r2,dr = control.fx;
    float fR2 = control.cz * control.cz;
    float mR2 = control.cw * control.cw;
   
    for(int i = 0; i < control.isteps; ++i) {
        pos.x = surfBoxFold(pos.x,control.cx,control.dx);
        pos.y = surfBoxFold(pos.y,control.cx,control.dx);
        pos.z = surfBoxFold(pos.z,control.cx,control.dx);
       
        r2 = pos.x*pos.x + pos.y*pos.y + pos.z*pos.z;
       
        if(r2 < mR2) {
            float temp = fR2 / mR2;
            pos *= temp;
            dr *= temp;
        }
        else if(r2 < fR2) {
            float temp = fR2 / r2;
            pos *= temp;
            dr *= temp;
        }
       
        pos = pos * control.fx + c;
        dr *= control.fx;
    }
   
    return length(pos)/abs(dr);
}

Stats:
Views: 36
Total Favorities: 0 View Who Favorited
Filesize: 1.78MB
Height: 1492 Width: 3154
Keywords: stereo 
Posted by: kosalos March 28, 2021, 05:06:03 AM

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

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