Forums > MaxMSP

bilinear interpolation of colors?

Nov 01 2013 | 8:12 pm

This shouldn’t be difficult but… :(

How do I create four-color gradient matrices of variable dimension with custom colors at each corner? I ideally I would like to use expressions to achieve this, though my understanding of jitter and jit.expr is limited.

At some point I would also like to apply curves to the gradients so I’m not limited to linear interpolation.. as well as selecting specific cells in the matrix as interpolation points (not just the corners).

Thoughts? This is kinda what I’m talking about…

— Pasted Max Patch, click to expand. —