kunz Difference between revisions of "Wrangle Examples"

Difference between revisions of "Wrangle Examples"

From kunz
(Created page with "<syntaxhighlight> vector centroid = getbbox_center(0); vector size = getbbox_size(0); size = min(size); // Largest component @P -= centroid; @P *= (1.0/size); @P = lerp(@P, @P...")
 
m (Admin moved page Wrangle examples to Wrangle Examples)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<syntaxhighlight>
<syntaxhighlight lang="C">
vector centroid = getbbox_center(0);
vector centroid = getbbox_center(0);
vector size = getbbox_size(0);
vector size = getbbox_size(0);

Latest revision as of 04:58, 28 September 2021

vector centroid = getbbox_center(0);
vector size = getbbox_size(0);
size = min(size); // Largest component
@P -= centroid;
@P *= (1.0/size);
@P = lerp(@P, @P+clamp(normalize(@P)*1.75,vector(-1),vector(1)) * (1.0-length(max(abs(@P)))), chf('blend'));
@P *= size;
@P += centroid;