## game: display a ball using opengl

how to move the ball using the acclerometer

and how collision between balls to be programmed

If you haven't chosen one, don't know what one is, and/or are complety new to game programming, take a gander at http://www.idevgames.com/forum/showthread.php?t=11896 to help point you in the right direction.

As far as collision detection, just use the distance formula from high school algebra:

dist = sqrt(x2-x1 * x2-x1 + y2-y1 * y2-y1)

if (dist < (radiusObj1 + radiusObj2) then collision occurred.

For 3D, just add the z term to the distance equation.

by default a rotating square is displayed in the opengles template of iphone sdk. i need a circle or a ball.

i have read basic tutorials but for ball can any one point out any tutorials as it differs for opengles