moving code

This commit is contained in:
Ben Hambrecht
2018-04-18 20:26:14 +02:00
parent 1e663fa2ab
commit 11a0145f26

View File

@ -10,21 +10,6 @@ GRADE_COLOR_1 = RED
GRADE_COLOR_2 = BLUE
def rainbow_color(alpha):
nb_colors = 100
rainbow = color_gradient([RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE], nb_colors)
rainbow = np.append(rainbow,PURPLE)
index = int(alpha * nb_colors)
return rainbow[index]
def graded_color(n,k):
if n != 0:
alpha = float(k)/n
else:
alpha = 0.5
color = interpolate_color(GRADE_COLOR_1, GRADE_COLOR_2, alpha)
return color
def graded_square(n,k):
return Square(