mirror of
				https://github.com/stevenrobertson/cuburn.git
				synced 2025-11-04 02:10:45 -05:00 
			
		
		
		
	Done with 77. Will pick and choose the rest.
This commit is contained in:
		@ -765,4 +765,85 @@ var(69, 'oscope', """
 | 
			
		||||
        oy += w*ty;
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(70, 'polar2', """
 | 
			
		||||
    float p2v = w / M_PI;
 | 
			
		||||
    ox += p2v * atan2f(x,y);
 | 
			
		||||
    oy += 0.5f * p2v * logf(tx*tx + ty*ty);
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(71, 'popcorn2', """
 | 
			
		||||
    float c = {{px.get('xf.popcorn2_c')}};
 | 
			
		||||
    ox += w * (tx + {{px.get('xf.popcorn2_x')}} * sinf(tanf(ty*c)));
 | 
			
		||||
    oy += w * (ty + {{px.get('xf.popcorn2_y')}} * sinf(tanf(tx*c)));
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(72, 'scry', """
 | 
			
		||||
    /* note that scry does not multiply by weight, but as the */
 | 
			
		||||
    /* values still approach 0 as the weight approaches 0, it */
 | 
			
		||||
    /* should be ok                                           */ 
 | 
			
		||||
    float t = tx*tx + ty*ty;
 | 
			
		||||
    float r = 1.0f / (sqrtf(t) * (t + 1.0f/w));
 | 
			
		||||
    ox += tx*r;
 | 
			
		||||
    oy += ty*r;
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(73, 'separation', """
 | 
			
		||||
    float sx2 = {{px.get('xf.separation_x * xf.separation_x', 'sx2')}};
 | 
			
		||||
    float sy2 = {{px.get('xf.separation_y * xf.separation_y', 'sy2')}};
 | 
			
		||||
    
 | 
			
		||||
    if (tx > 0.0f)
 | 
			
		||||
        ox += w * (sqrtf(tx*tx + sx2) - tx*{{ps.get('xf.separation_xinside')}});
 | 
			
		||||
    else
 | 
			
		||||
        ox -= w * (sqrtf(tx*tx + sx2) + tx*{{ps.get('xf.separation_xinside')}});
 | 
			
		||||
   
 | 
			
		||||
    if (ty > 0.0f)
 | 
			
		||||
        oy += w * (sqrtf(ty*ty + sy2) - ty*{{ps.get('xf.separation_yinside')}});
 | 
			
		||||
    else
 | 
			
		||||
        oy -= w * (sqrtf(ty*ty + sy2) + ty*{{ps.get('xf.separation_yinside')}});
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(74, 'split', """
 | 
			
		||||
    if (cosf(tx*{{px.get('xf.split_xsize')}}*M_PI) >= 0.0f)
 | 
			
		||||
        oy += w*ty;
 | 
			
		||||
    else
 | 
			
		||||
        oy -= w*ty;
 | 
			
		||||
      
 | 
			
		||||
    if (cosf(ty*{{px.get('xf.split_ysize')}}*M_PI) >= 0.0f)
 | 
			
		||||
        ox += w*tx;
 | 
			
		||||
    else
 | 
			
		||||
        ox -= w*tx;
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(75, 'splits', """
 | 
			
		||||
    if (tx >= 0.0f)
 | 
			
		||||
        ox += w*(tx + {{ps.get('xf.splits_x')}});
 | 
			
		||||
    else
 | 
			
		||||
        ox += w*(tx - {{ps.get('xf.splits_x')}});
 | 
			
		||||
      
 | 
			
		||||
    if (f->ty >= 0)
 | 
			
		||||
        oy += w*(ty + {{ps.get('xf.splits_y')}});
 | 
			
		||||
    else
 | 
			
		||||
        oy += w*(ty - {{ps.get('xf.splits_y')}});
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(76, 'stripes', """
 | 
			
		||||
    float roundx = floorf(tx + 0.5f);
 | 
			
		||||
    float offsetx = tx - roundx;
 | 
			
		||||
    ox += w * (offsetx * (1.0f - {{ps.get('xf.stripes_space')}}) + roundx);
 | 
			
		||||
    oy += w * (ty + offsetx*offsetx*{{ps.get('xf.stripes_warp')}});
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
var(77, 'wedge', """
 | 
			
		||||
    float r = sqrtf(tx*tx + ty*ty);
 | 
			
		||||
    float a = atan2f(ty, tx) + {{ps.get('xf.wedge_swirl')}} * r;
 | 
			
		||||
    float wc = {{ps.get('xf.wedge_count')}};
 | 
			
		||||
    float wa = {{ps.get('xf.wedge_angle')}};
 | 
			
		||||
    float c = floorf((wc * a + M_PI) * M_1_PI * 0.5f);
 | 
			
		||||
    float comp_fac = 1 - wa * wc * M_1_PI * 0.5f;
 | 
			
		||||
    a = a * comp_fac + c * wa;
 | 
			
		||||
    r = w * (r + {{ps.get('xf.wedge_hole')}});
 | 
			
		||||
    ox += r * cosf(a);
 | 
			
		||||
    oy += r * sinf(a);
 | 
			
		||||
    """)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user