this is getting more difficult....
first i will bounce the ball ....then will try to solve my next problem....thanks for ur help guys....
Printable View
this is getting more difficult....
first i will bounce the ball ....then will try to solve my next problem....thanks for ur help guys....
A float is more than enough to represent the orientations.Quote:
Using doubles for positions would probably be a good idea; you'll likely find that an acceleration of 2 doesn't work too well, and you need 2.5, or something.
If this isn't for a physics class you can fake the ball bounce by taking the sin component of a circle and applying it to the ball. As the ball bounces you can slow it down, thus lowering the amplitude of the sine wave. It's fake but it works.
To do true physics calculations it will require more than has been mentioned. For rotational effects you will need to calculate the first and second mass moment of inertia. You will need to compute the rotational inertia around the Cg at a time t. For a ball you would not need several point masses but you would need some type of mass calculation. You can use known volumes to approximate the MMOI's and a ball shape fits right into that.
If this is going to be in 3D and the video card is an NVidia 8800 GT or better I would recommend you use the PhysX SDK to do the simulation as it will simplify it greatly.