• May 12, 2021, 02:05:11 PM

Login with username, password and session length

 


3DickUlus MandelNestCarouselDesert Sands
Carousel
Previous Image | Next Image
Description: Rendition of Knighty's Kleinian : https://www.shadertoy.com/view/lstyR4
+ spherical inversion

CPU -------------------------------------
control.isteps = 4
control.cx = -0.6221869
control.cy = -0.8524064
control.cz = -0.02
control.cw = 0.8199991
control.dx = 1.5500005
control.dy = 0.93500006
control.dz = 1.5499997
control.dw = 0.8720002
control.fx = 0.905

control.v4a = float4(control.cx,control.cy,control.cz,control.cw)
control.v4b = float4(control.dx,control.dy,control.dz,control.dw)

control.doInversion = true
control.InvCx =  1.938
control.InvCy =  -1.19
control.InvCz =  -1.1760001
control.InvRadius =  7.7699976
control.InvAngle =  1.1700001
control.InvCenter = float3(control.InvCx,control.InvCy,control.InvCx)

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

float DE_Inner(float3 pos, device Control &control) {
    float k, scale = 1;
   
    for(int i=0; i < control.isteps; ++i) {
        pos = 2 * clamp(pos, control.v4a.xyz, control.v4b.xyz) - pos;

        k = max(control.v4a.w / dot(pos,pos), control.fx);
        pos *= k;
        scale *= k;
    }
   
    float rxy = length(pos.xy);
    return .7 * max(rxy - control.v4b.w, rxy * pos.z / length(pos)) / scale;
}

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: 32
Total Favorities: 0 View Who Favorited
Filesize: 3.02MB
Height: 1340 Width: 2782
Keywords: stereo 
Posted by: kosalos March 12, 2021, 07:47:35 AM

Rating: ***** by 3 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 (2)

Sabine62
3f
******
Offline Offline

Posts: 1201


It's just a jump to the left...


View Profile WWW
March 12, 2021, 03:32:00 PM
Super! :thumbs:
Caleidoscope
Moderator
*
Offline Offline

Posts: 856



View Profile WWW
March 12, 2021, 10:34:32 PM
Very pretty  :yes:

Return to Gallery


Powered by SMF Gallery Pro