views:

1176

answers:

4

I want to start writing simple iphone apps to simulate in 3D things like rolling dice, playing billiards, dropping objects from a certain height, throwing a ball, etc. Just basic motion simulation in 3D. I've searched and searched for a tutorial that would get me started here without success. A perfect intro tutorial for me would be a project that simulates the rolling of 2 dice in 3D. Can anyone point me in the appropriate direction? Many thanks in advance!

+4  A: 

THe NeHe site contains alot of tutorials, many of them using physics in 3D. This should bootstrap your learning. The examples are for OpenGL and come in many languages (including Objective-C I think).

The physics will probably not be that accurate. This site and also this one give some hint about the physics of rolling dice.

However, speaking to a friend physicist about this he recons it would be simpler to use a statistical approach and then mock the physics because there are a lot of variables at work and there isn't much point simulating an event designed to be random-ish.

But then again, Im no physicist.

I also found this iPhone app which uses dice simulation. Might be some inspiration.

Aiden Bell
+1  A: 

I just found this site which seems to have a great set of tutorials for opengl es: Opengl es tutproals

ennuikiller
+2  A: 

OpenGL ES from the Ground Up is a site dedicated to OpenGL ES on the iPhone. It includes some of the tutorials from the NeHe site ported to the iPhone. I don't know how much of the information will be relevant to motion simulation but it's definitely worth a read for learning OpenGL.

John S. Eddie
A: 

Feel free to check out my demo with a rolling billiard ball.

Youtube clip

The source code is included in the demo zip available here

epatel