Preview:
global proc ballBounce()
{
	string $ball[] = `polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1`;
	expression -s ($ball[0]+".translateY = abs(sin(time*4)*10);\n"
				  +$ball[0]+".translateZ = time*4;")  -o $ball[0] -ae 1 -uc all ;

}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter