Generation

generate functionSun, 13 Nov 2022

get x and y integer coords from bezier curve python

def get_x_coords(p1,p2,p3,p4,t): x_coords = (1-t)**3 * p1[0] + 3 *(1-t)**2 * t * p2[0] + 3 * (1-t)* t**2 * p3[0] + t**3 * p4[0] return x_coords def get_y_coords(p1,p2,p3,p4,t): y_coords = (1-t)**3 * p1[1] + 3 *(1-t)**2 * t * p2[1] + 3 * (1-t)* t**2 * p3[1] + t**3 * p4[1] return y_coords

Questions about programming?Chat with your personal AI assistant