Click here to Skip to main content
15,889,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: " System.UriFormatException: Invalid URI : The format of the URI could not be determined " Pin
Pete O'Hanlon8-Jul-13 10:44
mvePete O'Hanlon8-Jul-13 10:44 
QuestionMaths for bouncing a ball around a window.. Pin
Kevin Bewley8-Jul-13 4:42
Kevin Bewley8-Jul-13 4:42 
AnswerRe: Maths for bouncing a ball around a window.. Pin
NickPace8-Jul-13 5:10
NickPace8-Jul-13 5:10 
GeneralRe: Maths for bouncing a ball around a window.. Pin
Kevin Bewley8-Jul-13 5:19
Kevin Bewley8-Jul-13 5:19 
GeneralRe: Maths for bouncing a ball around a window.. Pin
NickPace8-Jul-13 5:25
NickPace8-Jul-13 5:25 
GeneralRe: Maths for bouncing a ball around a window.. Pin
Kevin Bewley8-Jul-13 5:46
Kevin Bewley8-Jul-13 5:46 
GeneralRe: Maths for bouncing a ball around a window.. Pin
harold aptroot8-Jul-13 6:00
harold aptroot8-Jul-13 6:00 
AnswerRe: Maths for bouncing a ball around a window.. Pin
Keld Ølykke8-Jul-13 20:11
Keld Ølykke8-Jul-13 20:11 
As Harold mentioned you have to make a computation strategy for collisions e.g. ball vs ball and ball vs frame. Here are some terms that you can google.

You can go the variable time step way - good for getting the simulation right.
You can go fixed time step - good for having the simulation go fast.

One computation strategy could be as follows until no more collisions occur in a time step:
- within a time step calculate the next collision
- calculate the physics for involved objects

Collision checking is a discipline in itself - a moving ball within a time step can be looked at as a sweeping volume being a capsule. Collision checking results in a collision time within a time step and a set of contact points.

The physics can be as complicated as you want to. You can keep it very simple by sticking with kinematics (position, velocity) added some impulse calculation or go very exotic by adding lots of dynamics (gravity, friction, spin, energy loss, etc.).

About gravity:
If gravity is g (9.82[m/s^2]) downwards and you have a time step of deltaTime [s], all balls need to have their velocity changed by

velocity change due to gravity: deltaVg = deltaTime * g


In any case, have fun Smile | :)

Kind Regards,

Keld Ølykke
QuestionWebException timeout Problem. Pin
vishalmudrale8-Jul-13 4:04
vishalmudrale8-Jul-13 4:04 
QuestionRe: WebException timeout Problem. Pin
Eddy Vluggen8-Jul-13 4:59
professionalEddy Vluggen8-Jul-13 4:59 
AnswerRe: WebException timeout Problem. Pin
vishalmudrale8-Jul-13 20:20
vishalmudrale8-Jul-13 20:20 
QuestionRe: WebException timeout Problem. Pin
vishalmudrale8-Jul-13 20:21
vishalmudrale8-Jul-13 20:21 
AnswerRe: WebException timeout Problem. Pin
Eddy Vluggen9-Jul-13 0:22
professionalEddy Vluggen9-Jul-13 0:22 
GeneralRe: WebException timeout Problem. Pin
vishalmudrale9-Jul-13 0:40
vishalmudrale9-Jul-13 0:40 
GeneralRe: WebException timeout Problem. Pin
Eddy Vluggen9-Jul-13 3:03
professionalEddy Vluggen9-Jul-13 3:03 
QuestionDeveloping a Point of Sale System for Reataurant/Hotel Pin
MohdWaseem8-Jul-13 3:46
MohdWaseem8-Jul-13 3:46 
AnswerRe: Developing a Point of Sale System for Reataurant/Hotel Pin
Manfred Rudolf Bihy8-Jul-13 4:46
professionalManfred Rudolf Bihy8-Jul-13 4:46 
AnswerRe: Developing a Point of Sale System for Reataurant/Hotel Pin
Dave Kreskowiak8-Jul-13 5:18
mveDave Kreskowiak8-Jul-13 5:18 
AnswerRe: Developing a Point of Sale System for Reataurant/Hotel Pin
Walt Dexter8-Jul-13 7:21
Walt Dexter8-Jul-13 7:21 
AnswerRe: Developing a Point of Sale System for Reataurant/Hotel Pin
Bernhard Hiller8-Jul-13 23:12
Bernhard Hiller8-Jul-13 23:12 
QuestionMessage Closed Pin
7-Jul-13 11:28
User34907-Jul-13 11:28 
AnswerRe: double.tryparse() Pin
Garth J Lancaster7-Jul-13 12:33
professionalGarth J Lancaster7-Jul-13 12:33 
AnswerRe: double.tryparse() PinPopular
Mycroft Holmes7-Jul-13 13:06
professionalMycroft Holmes7-Jul-13 13:06 
QuestionC# Pin
Manish Kumar1234567-Jul-13 9:56
Manish Kumar1234567-Jul-13 9:56 
AnswerRe: C# Pin
Pete O'Hanlon7-Jul-13 10:45
mvePete O'Hanlon7-Jul-13 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.