News Feed

Bureau V

News Feed

Means of Production

Thursday
Feb152007

« Beatrice »

phase shift 1-6.jpg
phase 1-6

phase shift 7-12.jpg
phase 7-12

I helped my friend / collaborator Stella Lee with the idea for this MEL script which creates dynamic radial gradients along a grid.  I didn’t do much more than suggest how it could be done, while she did all the work of writing and debugging the script — so I feel good about taking equal credit for the discovery. The editable script follows >
 


// SCRIPT FOR RADIALLY GRADIENT SCALAR COMPONENTS LINED ALONG A GRID

// first must duplicate special with input graph or connections
// THIS ONE ALLOWS FOR TWO POINTS OF INFLUENCE

// DISTANCE BETWEEN LOCATOR AND CIRCLE ALONG X AND Z AXES
float $distAX = (locatorA1.translateX - circle1.translateX);
float $distAZ = (locatorA1.translateZ - circle1.translateZ);

float $distBX = (locatorB1.translateX - circle1.translateX);
float $distBZ = (locatorB1.translateZ - circle1.translateZ);

// SETS SCALE OF CIRCLE ACCORDING TO DISTANCE OF LOCATOR FROM CIRCLE
circle1.scaleX = (((tan((sqrt(pow($distAX,2) + pow($distAZ,2)))/130))) + (tan((sqrt(pow($distBX,2) + pow($distBZ,2)))/130)))/16;
circle1.scaleY = (((tan((sqrt(pow($distAX,2) + pow($distAZ,2)))/65))) + (tan((sqrt(pow($distBX,2) + pow($distBZ,2)))/65)))/16;

// SETS MINIMUM VALUE OF CIRCLE
if (abs(circle1.scaleX) < .25)
circle1.scaleX = .25;

if (abs(circle1.scaleY) < .25)
circle1.scaleY = .25;

// SETS MAXIMUM VALUE OF CIRCLE
if (abs(circle1.scaleX) > .65)
circle1.scaleX = .65;

if (abs(circle1.scaleY) > .5)
circle1.scaleY = .5;

// SETS MAXIMUM VALUE OF CIRCLE
if ((abs(circle1.scaleX) > .65) && (abs(circle1.scaleY) > .3))
circle1.scaleX = .65;
circle1.scaleY = .3;