
from piscript.PiModule import *
from piscript.Arrows import Arrow

ps = init("qt", 200, 48)

beginpage()
center()
scale(30)
translate(-2,0)

p0 = Vector([ -1, 0 ])
p1 = Vector([ 0, 2 ])
p2 = Vector([ 1, 0 ])

def P(t):
	s = 1-t
	return p0*(s*s) + p1*(2*s*t) + p2*(t*t)

scalelinewidth(1)
sw = 0.05
hw = 4*sw
setarrowdims(sw, hw)
a = [
	 [ [-1,0], [1, 2] ],
	 [ [0,0], [1,-2] ],
	 [ [1,0], [1,2] ],
	 [ [2,0], [1,-2] ],
	 [ [3,0], [1,2] ],
	 [ [4,0], [1,-2] ],
	 [ [5,0], [1,2] ],
]

for i in range(len(a)):
	newpath()
	circle(a[i][0], 0.064)
	fill(0.5)

newpath()
quadarrow(a)
fill(1,0.8,0.8)
scalelinewidth(0.3)
stroke()
peach = [ 1,0.95,0.90 ]

endpage()
finish()
