Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xVals = [x for x,y in basePoints]
- pyramid = []
- pyramid.append(basePoints[0])
- pyramid.append(basePoints[1])
- pyramid[1].append((basePoints[1][1] - basePoints[0][1]) / (basePoints[1][0] - basePoints[0][0]))
- for x in range(2, n):
- pyramid.append(basePoints[x])
- for y in range(x):
- pyramid[x].append((pyramid[x][y + 1] - pyramid[x - 1][y + 1]) / (xVals[x] - xVals[x - (y + 1)]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement