Hi, I updated my question with my latest development of the problem:

Here's what I have, a set of 3d vectors in a 3d flow.

But they face different directions in the flow (backwards and forwards, left and right). I need to generate a lookup table of n random colours for each possible normal vector within some degree of accuracy (e.g. a sphere of some resolution where each vertex contains a colour), where opposite normal vectors (e.g. change sign) have the same colour.

I then, idealistically (but not necessarily) need a function which finds the nearest normal vector & corresponding colour in this table, from a given normal vector.

Input: normal vector

Output: colour for corresponding closest normal vector

-> where all opposite vectors in the "lookup sphere" have the same colour.

Edit: Ah, nevermind - i've got this mostly working now.

Thanks,

Chris