Showing posts with label common. Show all posts
Showing posts with label common. Show all posts

Saturday 16 September 2017

set colour according to bounding box.

now that the old Point node is more or less dead and buried, we have to rely on wrangles or vops to set our colours in fancy ways.

To give an object a gradient of colour based on it's bounding box (eg. black-to-red, from -ve to +ve on the x axis) we can use the relbbox function.
In a wrangle, we can type

@Cd=set(relbbox(@P.x),0,0);

tadah!