function draw() {
		if (x < (0 + 25) || x > (width - 25)){
		vx = -vx;
		fill(random(0, 255),random(0, 255), random(0, 255)) ;
	}
	if (y < (0 + 25) || y > (height - 25)){
		vy = -vy;
		fill(random(0, 255),random(0, 255), random(0, 255)) ;
	}
	if (z < (0 + 25) || z > (height - 25)){
		vz = -vz;
		fill(random(0, 255),random(0, 255), random(0, 255)) ;
	}
	x += vx;
	y += vy;
	
	torus(x, y);
}
//Draw function code from Zach Whalen's 'Move and Bounce' sketch
Draw function code from Zach Whalen's 'Move and Bounce' sketch
Draw function code from Zach Whalen ' s ' Move and Bounce ' sketch
function draw() {
		if (x < (0 + 25) || x > (width - 25)){
		vx = -vx;
		fill(random(0, 255),random(0, 255), random(0, 255)) ;
	}
	if (y < (0 + 25) || y > (height - 25)){
		vy = -vy;
		fill(random(0, 255),random(0, 255), random(0, 255)) ;
	}
	if (z < (0 + 25) || z > (height - 25)){
		vz = -vz;
		fill(random(0, 255),random(0, 255), random(0, 255)) ;
	}
	x += vx;
	y += vy;
	torus(x, y);
}
function draw ( ) { if ( x < ( 0 + 25 ) || x > ( width - 25 ) ) { vx = - vx ; fill ( random ( 0 , 255 ) , random ( 0 , 255 ) , random ( 0 , 255 ) ) ; } if ( y < ( 0 + 25 ) || y > ( height - 25 ) ) { vy = - vy ; fill ( random ( 0 , 255 ) , random ( 0 , 255 ) , random ( 0 , 255 ) ) ; } if ( z < ( 0 + 25 ) || z > ( height - 25 ) ) { vz = - vz ; fill ( random ( 0 , 255 ) , random ( 0 , 255 ) , random ( 0 , 255 ) ) ; } x += vx ; y += vy ; torus ( x , y ) ; }
Draw function code from Zach Whalen's 'Move and Bounce' sketch
Draw function code from Zach Whalen ' s ' Move and Bounce ' sketch