All pastes #804083 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-12-03 02:35 UTC
rendered paste body
def pastel_spiral_still(px=640,py=640):
	p = Routine()
	p.pixels(px,py)
	x,y = p.domain(-1,1,-1,1)
	rad,ang = rect2polar(x,y)
	hue = ang + 1*sin(10*rad + 20)
	r,g,b = hsv2rgb(hue * 3.0/math.pi, 1, 1)
	p.ppm_out("./pastel.ppm",r,g,b)
	p.go()