func renderNewFrame( canvas *opencv.IplImage, images []*opencv.IplImage, mask *opencv.IplImage) {
	opencv.Zero(mask)
	opencv.Copy(images[rand.Int() % len(images)], canvas, nil)
	rgb := opencv.ScalarAll(255.0)
	for i := 0 ; i < canvas.Width()/2; i+=20 {
		pt1 := opencv.Point{ ((-2 * canvas.Width() / 4) + i), 0 }
		pt2 := opencv.Point{ i, canvas.Height() }
		pt3 := opencv.Point{ (6 * canvas.Width() / 4) - i, 0 }
		pt4 := opencv.Point{ canvas.Width() - i, canvas.Height() }
		opencv.Line(mask, pt1, pt2, rgb, 200, 8, 0)		
		opencv.Line(mask, pt3, pt4, rgb, 200, 8, 0)		
	}
	opencv.Copy(images[rand.Int() % len(images)], canvas, mask)
}
// renders onto canvas
// mask gets wiped
// canvas and mask are mutated, images are not
renders onto canvas
mask gets wiped
canvas and mask are mutated, images are not
// renders onto canvas // mask gets wiped // canvas and mask are mutated images are not
func renderNewFrame( canvas *opencv.IplImage, images []*opencv.IplImage, mask *opencv.IplImage) {
	opencv.Zero(mask)
	opencv.Copy(images[rand.Int() % len(images)], canvas, nil)
	rgb := opencv.ScalarAll(255.0)
	for i := 0 ; i < canvas.Width()/2; i+=20 {
		pt1 := opencv.Point{ ((-2 * canvas.Width() / 4) + i), 0 }
		pt2 := opencv.Point{ i, canvas.Height() }
		pt3 := opencv.Point{ (6 * canvas.Width() / 4) - i, 0 }
		pt4 := opencv.Point{ canvas.Width() - i, canvas.Height() }
		opencv.Line(mask, pt1, pt2, rgb, 200, 8, 0)		
		opencv.Line(mask, pt3, pt4, rgb, 200, 8, 0)		
	}
	opencv.Copy(images[rand.Int() % len(images)], canvas, mask)
}
func renderNewFrame ( canvas * opencv . IplImage , images [ ] * opencv . IplImage , mask * opencv . IplImage ) { opencv . Zero ( mask ) opencv . Copy ( images [ rand . Int ( ) % len ( images ) ] , canvas , nil ) rgb := opencv . ScalarAll ( 255.0 ) for i := 0 ; i < canvas . Width ( ) / 2 ; i += 20 { pt1 := opencv . Point { ( ( - 2 * canvas . Width ( ) / 4 ) + i ) , 0 } pt2 := opencv . Point { i , canvas . Height ( ) } pt3 := opencv . Point { ( 6 * canvas . Width ( ) / 4 ) - i , 0 } pt4 := opencv . Point { canvas . Width ( ) - i , canvas . Height ( ) } opencv . Line ( mask , pt1 , pt2 , rgb , 200 , 8 , 0 ) opencv . Line ( mask , pt3 , pt4 , rgb , 200 , 8 , 0 ) } opencv . Copy ( images [ rand . Int ( ) % len ( images ) ] , canvas , mask ) }
renders onto canvas
mask gets wiped
canvas and mask are mutated, images are not
renders onto canvas mask gets wiped canvas and mask are mutated images are not