import rhinoscriptsyntax as rs
## Degree 3 Beizer Curve
def linterp(p1,p2,t):
	tx = p1[0] + (p2[0] - p1[0]) * t
	ty = p1[1] + (p2[1] - p1[1]) * t
	return (tx,ty,0)
p1 = (0,0,0)
p2 = (0,20,0)
p3 = (20,20,0)
p4 = (20,0,0)
t = 0
while t <= 1:
	t1 = linterp(p1,p2,t)
	t2 = linterp(p2,p3,t)
	t3 = linterp(p3,p4,t)
	t4 = linterp(t1,t2,t)
	t5 = linterp(t2,t3,t)
	t6 = linterp(t4,t5,t)
	rs.AddPoint(t6)
	t = t + 0.005