This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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') |