View main.py
def rec(newPts, pts, t):
if len(pts) >= 2:
newPts.append('%s%s' % (pts[0], pts[1]))
pts.pop(0)
rec(newPts, pts, t)
def bez(pts, t):
number = len(pts)-1
newPts = []
rec(newPts, pts, t)
View index.html
<!doctype html>
<html>
<head>
</head>
<body>
<canvas id="canvas" width="800" height="600"></canvas>
<script type="text/javascript">
var ctx = document.getElementById('canvas').getContext('2d')