You are not logged in.

- Topics: Active | Unanswered

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,780

Remember it is the radius squared.

The problem you are now describing is like asking how many cakes can I bake with some eggs. You do not know how many eggs per cake it takes and you do not know how many total eggs you have. The question is incomplete. I need much more information otherwise any answer is possible.

*Last edited by bobbym (2013-02-22 07:34:44)*

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**SmellyMan****Member**- Registered: 2011-03-06
- Posts: 63

bobbym wrote:

Remember it is the radius squared.

The problem you are now describing is like asking how many cakes can I bake with some eggs. You do not know how many eggs per cake it takes and you do not know how many total eggs you have. The question is incomplete. I need much more information otherwise any answer is possible.

Pardon my ignorance, I thought I've explained it well before, but I guess I haven't.

This game is a turned based strategy sort of, each side has different units. The combat works in a round way. Basically you input your commands, and when the round is over they start moving. In the process of moving to a different point means that a tank will encounter a different tank. If it's in radius, as we calculated, he'll start shooting.

This plane is limited in a 2d space (let's says 1000m by 1000m). A tank has a certain radius of shooting (let's say 20m) and a speed of 100m/s.

Let's pretend I command my tank to move from a point P(100m,100m) to a point P1(100m,500m), meaning he'll travel 400m, taking him 4 seconds to reach that destination. He has a radius of 20m, and if he meets and enemy on that path in those 4 seconds, he'll start shooting at him.

A tank2 is moving from a point P2(200m,500) to a P3(100m,500m) in this example. He has a radius of 50m, meaning he is able to shoot targets that are 50m away from him. He also has a speed of 100m/s. He'll meet the tank1 on his path, and they'll engage in combat, but due to his bigger radius, it means he'll shoot him for longer as he's moving than the tank 1.

Now, I don't know how to approach this problem and see WHEN will tank1 start shooting other units based on his path and his movement speed, and the other problem how long will they stay intersected.

Figuring out the relative speed in this case also wouldn't be a problem, meaning I should be able to deduct for how long their paths would intervene. But as said, the radius is what throws me off, as one tank can have a bigger radius than the other one.

If I wasn't clear enough, I can draw a picture to show you what exactly I mean by that.

*Last edited by SmellyMan (2013-02-22 07:47:01)*

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,780

Hi;

You are explaining it fine and this time you are supplying some numbers. Some constraints on the problem that mean simpler formulas rather than dozens of equations with hundreds of variables, none of which we know.

Okay, my question now is what do want to know exactly?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**SmellyMan****Member**- Registered: 2011-03-06
- Posts: 63

bobbym wrote:

Hi;

You are explaining it fine and this time you are supplying some numbers. Some constraints on the problem that mean simpler formulas rather than dozens of equations with hundreds of variables, none of which we know.

Okay, my question now is what do want to know exactly?

We know the exact position of the tanks, their exact radius, their movement speed, as well as the full length of their paths, as well as their starting and ending points.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,780

What do you want to do with that? What question are you asking?

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**SmellyMan****Member**- Registered: 2011-03-06
- Posts: 63

bobbym wrote:

What do you want to do with that? What question are you asking?

I'm asking when and at what point will one tank start shooting other units. I'm also asking for how long that tank will shoot that unit.

Basically, the starting point of when Tank1 will shoot Tank2, and the ending point of when Tank1 will stop shooting Tank2.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,780

When you say how long would you be satisfied with n seconds or do you want an answer like 39 seconds?

*Last edited by bobbym (2013-02-22 08:19:38)*

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**SmellyMan****Member**- Registered: 2011-03-06
- Posts: 63

bobbym wrote:

When you say how long would you be satisfied with n seconds or do you want an answer like 39 seconds?

n seconds is understandable to me. Basically it's just a matter of figuring out basing on the information we have (radius of the tank shooting range, his movement speed, path length and the direction of his path).

The entry point of when the tank starts shooting is also necessary in this case for us to be able to calculate any more information.

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,780

Hi;

I will work on it and see what can be done. I will post back here if I get anything.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**

**SmellyMan****Member**- Registered: 2011-03-06
- Posts: 63

bobbym wrote:

Hi;

I will work on it and see what can be done. I will post back here if I get anything.

Thank you for your time. If there is anything I can do to repay you in some way, I'll try my best to do so!

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 104,780

Hi;

I haven't done anything yet so your thanks are premature.

**In mathematics, you don't understand things. You just get used to them.****If it ain't broke, fix it until it is.**

**Online**