示例#1
0
def shader(x, y):
    P = (x * 44.0, y * 2.0)  # high frequency signal
    dP = art.simnoise2d(
        (13.5 + x * 1.3, 23.5 + y * 1.3))  # low frequency signal
    P = art.addV(dP, P)  # dP added to P
    c, C = art.voronoinoise2d(P)
    brown1 = (0.5, 0.4, 0.05)
    brown2 = (0.35, 0.27, 0.03)
    return art.mixV(brown1, brown2, c)
示例#2
0
def voronoishader(x, y):
    c, C = art.voronoinoise2d((x * 16.0, y * 16.0))
    C = art.tilenoise2d(C)
    # remap domain from (-1,1) to (0,1) for output
    return (C[0] * 0.5 + 0.5, C[1] * 0.5 + 0.5, C[2] * 0.5 + 0.5)
示例#3
0
def voronoishader(x, y):
    c, C = art.voronoinoise2d((x * 16.0, y * 16.0))
    return (c,c,c)
示例#4
0
def shader(x, y):
    P = (x*16.0, y*16.0)
    c, C = art.voronoinoise2d(P, distance)
    return (c,c,c)
示例#5
0
def distanceonly(P):
    c, C = art.voronoinoise2d(P)
    return (c,c,c)
示例#6
0
def shader(x, y):
    P = (x * 16.0, y * 16.0)
    c, C = art.voronoinoise2d(P, distance)
    C = [2 * (c - 0.2)] * 3  # clamp, but brighten too
    return C
示例#7
0
def voronoishader(x, y):
    c, C = art.voronoinoise2d((x * 16.0, y * 16.0))
    C = art.tilenoise2d(C)
    C = (C[0]*0.5 + 0.5, C[1]*0.5 + 0.5, C[2]*0.5 + 0.5)
    C = tuple((1-c)*x for x in C)
    return C