Can any one please assist with code for two objects coming from different direction. Subsequently, collide after intersection. The objects should be moving at 80km/h. And collision should happen shortly 30 minutes after take off
That's a program with many parts. You need to provide much more information. Is this a console application or a GUI? What do the objects look like? What does 80 km/h mean in relation to the computer screen (i.e. what is the distance in kilometers of the computer screen width)? And many other details. You need to decide with much more specificity what you want, tell us what you know how to do already, and post at least an attempt at this.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
This sounds like a physics problem with elements of-
Newton's Law
Conservation of Momentum
(Possible) Conservation of Energy
-You will most definitely need Conservation of Momentum since during the collision, there's no telling how much energy is lost from heat due to air resistance/crumpling. The first two laws should be a good start.
Also, what is the angle of misdirection? I have a program that can solve these kinds of problems but its written in Java.
It all depends on what the OP has in mind regarding the collision. He/she could be looking for a collision that follows all of the laws of physics to the letter or the collision could simply be to display "Kaboom!" in text when it happens. We have no way of knowing until the OP tells us.
VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711