5 return 1.055*(l**(1/2.4))-0.055
7 def get_colormap(srgb):
13 def make_unique(values):
22 def get_linked_node_and_socket(node_tree, socket):
23 for l in node_tree.links:
24 if socket==l.to_socket:
25 return (l.from_node, l.from_socket)
26 elif socket==l.from_socket:
27 return (l.to_node, l.to_socket)
30 def compute_bounding_sphere(points):
31 p1 = max(((p, p.length) for p in points), key=lambda x:x[1])[0]
32 p2 = max(((p, (p-p1).length) for p in points), key=lambda x:x[1])[0]
34 radius = (p1-p2).length/2
38 center += d*(1-radius/d.length)/2
39 radius = (radius+d.length)/2